public bool StoreDelete(Store store) { return Execute<bool>(dal => { Store storeDelete = dal.Store.Where(x => x.BusinessEntityID == store.BusinessEntityID).FirstOrDefault(); if (storeDelete != null) { dal.Store.DeleteOnSubmit(storeDelete); dal.SubmitChanges(); return true; } return false; }); }
public bool StoreUpdate(Store store) { return Execute<bool>(dal => { Store storeUpdate = dal.Store.Where(x => x.BusinessEntityID == store.BusinessEntityID).FirstOrDefault(); if (storeUpdate != null) { storeUpdate.BusinessEntityID = store.BusinessEntityID; storeUpdate.Name = store.Name; storeUpdate.SalesPersonID = store.SalesPersonID; storeUpdate.Demographics = store.Demographics; storeUpdate.rowguid = store.rowguid; storeUpdate.ModifiedDate = store.ModifiedDate; dal.SubmitChanges(); return true; } return false; }); }
partial void DeleteStore(Store instance);
private void detach_Stores(Store entity) { this.SendPropertyChanging(); entity.SalesPerson = null; }
partial void UpdateStore(Store instance);
partial void InsertStore(Store instance);
public void StoreUpdate(Store store) { adventureWorks_BC.StoreUpdate(store); }
public void StoreDelete(Store store) { adventureWorks_BC.StoreDelete(store); }
public void StoreAdd(Store store) { adventureWorks_BC.StoreAdd(store); }