public void Update(Category category) { Category dest = WebSiteDB.MyNorthwind.Categories.FirstOrDefault( c => c.CategoryID == category.CategoryID); if( dest != null ) dest.CategoryName = category.CategoryName; }
public void Insert(Category category) { int maxId = WebSiteDB.MyNorthwind.Categories.Max(x => x.CategoryID); category.CategoryID = maxId + 1; WebSiteDB.MyNorthwind.Categories.Add(category); }
public int Test6(Category category, Product product, Customer customer, string stringVal) { TestSerializerModel3 model = new TestSerializerModel3 { StringVal = stringVal, Category = category, Customer = customer, Product = product }; if( model.Equals(s_lastTestSerializerModel3) ) return 1; else return 0; }
public void Update(Category category) { category.EnsureItemIsOK(); BllFactory.GetCategoryBLL().Update(category); }
public void Insert(Category category) { category.EnsureItemIsOK(); BllFactory.GetCategoryBLL().Insert(category); }
public void Update(Category category) { DbHelper.ExecuteNonQuery("UpdateCategory", category); }
public void Insert(Category category) { DbHelper.ExecuteNonQuery("InsertCategory", category); }