partial void DeleteCategory(Category instance);
partial void InsertCategory(Category instance);
partial void UpdateCategory(Category instance);
/// <summary> /// Adds category and submit changes /// </summary> public Category Save(Category model) { if(model.Id < 1) { throw new NotImplementedException("ProductDataContext is removed, use EF!"); //_dataContext.Categories.InsertOnSubmit(model); }else { throw new NotImplementedException("ProductDataContext is removed, use EF!"); //Category entity = _dataContext.Categories.SingleOrDefault(x => x.Id.Equals(model.Id)); //entity.Name = model.Name; //entity.OrganizationId = model.OrganizationId; //entity.ParentId = model.ParentId; //entity.StatusId = model.StatusId; //entity.CategoryTypeId = model.CategoryTypeId; } _dataContext.SubmitChanges(); return model; }