Ejemplo n.º 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;
		}
Ejemplo n.º 2
0
		public void Update(Category category)
		{
			category.EnsureItemIsOK();

			BllFactory.GetCategoryBLL().Update(category);
		}
Ejemplo n.º 3
0
		public void Insert(Category category)
		{
			category.EnsureItemIsOK();

			BllFactory.GetCategoryBLL().Insert(category);
		}
Ejemplo n.º 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);
		}