Update the repsitories to know the "Add" function
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user