Пример #1
0
 public Task <int> SaveProductTableAsync(ProductTable item)
 {
     if (item.ID != 0)
     {
         return(database.UpdateAsync(item));
     }
     else
     {
         return(database.InsertAsync(item));
     }
 }
Пример #2
0
 public Task <int> DeleteProductTableAsync(ProductTable item)
 {
     try { return(database.DeleteAsync(item)); }
     catch (Exception ex) { System.Diagnostics.Debug.WriteLine("Error:{0}", ex.Message.ToString()); return(null); }
 }