public bool ProductCategoryDelete(ProductCategory productcategory) { return Execute<bool>(dal => { ProductCategory productcategoryDelete = dal.ProductCategory.Where(x => x.ProductCategoryID == productcategory.ProductCategoryID).FirstOrDefault(); if (productcategoryDelete != null) { dal.ProductCategory.DeleteOnSubmit(productcategoryDelete); dal.SubmitChanges(); return true; } return false; }); }
public bool ProductCategoryUpdate(ProductCategory productcategory) { return Execute<bool>(dal => { ProductCategory productcategoryUpdate = dal.ProductCategory.Where(x => x.ProductCategoryID == productcategory.ProductCategoryID).FirstOrDefault(); if (productcategoryUpdate != null) { productcategoryUpdate.ProductCategoryID=productcategory.ProductCategoryID; productcategoryUpdate.Name=productcategory.Name; productcategoryUpdate.rowguid=productcategory.rowguid; productcategoryUpdate.ModifiedDate=productcategory.ModifiedDate; dal.SubmitChanges(); return true; } return false; }); }
partial void DeleteProductCategory(ProductCategory instance);
partial void UpdateProductCategory(ProductCategory instance);
partial void InsertProductCategory(ProductCategory instance);
public void ProductCategoryUpdate(ProductCategory productcategory) { adventureWorks_BC.ProductCategoryUpdate(productcategory); }
public void ProductCategoryAdd(ProductCategory productcategory) { adventureWorks_BC.ProductCategoryAdd(productcategory); }