Update the repsitories to know the "Add" function

This commit is contained in:
Sébastien André
2019-12-05 08:29:11 +01:00
parent 45ffa1f3c2
commit a5b450a56d
8 changed files with 53 additions and 6 deletions

View File

@@ -32,6 +32,22 @@ namespace skydiveLogs_api.Data
return _col.Update(updatedDz);
}
public bool Add(DropZone newDz)
{
var result = true;
try
{
_col.Insert(newDz);
}
catch
{
result = false;
}
return result;
}
private readonly IDataProvider _dataProvider;
private readonly LiteCollection<DropZone> _col;