Beispiel #1
0
		public void Update(Category category)
		{
			Category dest = WebSiteDB.MyNorthwind.Categories.FirstOrDefault(
								c => c.CategoryID == category.CategoryID);
			if( dest != null )
				dest.CategoryName = category.CategoryName;
		}
Beispiel #2
0
		public void Update(Category category)
		{
			category.EnsureItemIsOK();

			BllFactory.GetCategoryBLL().Update(category);
		}
Beispiel #3
0
		public void Insert(Category category)
		{
			category.EnsureItemIsOK();

			BllFactory.GetCategoryBLL().Insert(category);
		}
Beispiel #4
0
		public void Insert(Category category)
		{
			int maxId = WebSiteDB.MyNorthwind.Categories.Max(x => x.CategoryID);
			category.CategoryID = maxId + 1;
			WebSiteDB.MyNorthwind.Categories.Add(category);
		}