Example #1
0
 /// <summary>
 /// Save item async
 /// </summary>
 /// <param name="item"></param>
 /// <returns></returns>
 public Task <int> SaveItemAsync(DatabaseEntryModel item)
 {
     if (item.ID != 0)
     {
         return(database.UpdateAsync(item));
     }
     else
     {
         return(database.InsertAsync(item));
     }
 }
Example #2
0
 /// <summary>
 /// Delete item async
 /// </summary>
 /// <param name="item"></param>
 /// <returns></returns>
 public Task <int> DeleteItemAsync(DatabaseEntryModel item)
 {
     return(database.DeleteAsync(item));
 }