Exemplo n.º 1
0
 public Task <int> SaveFoodForDay(FoodDayEntry entry)
 {
     try
     {
         if (entry.Id == 0)
         {
             return(_database.InsertAsync(entry));
         }
         else
         {
             return(_database.UpdateAsync(entry));
         }
     }
     catch (Exception e)
     {
         Debug.WriteLine("Error: " + e.Message);
         throw;
     }
 }
Exemplo n.º 2
0
 public Task <int> DeleteFoodForDay(FoodDayEntry entry)
 {
     return(_database.DeleteAsync(entry));
 }