public Task <int> SaveProductTableAsync(ProductTable item) { if (item.ID != 0) { return(database.UpdateAsync(item)); } else { return(database.InsertAsync(item)); } }
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); } }