public bool updateSmartPhone(Smartphone smartPhone) { Smartphone smartphoneUpdate = db.Smartphones.SingleOrDefault(x => x.Code == smartPhone.Code); if (smartphoneUpdate != null) { smartphoneUpdate.Name = smartPhone.Name; smartphoneUpdate.Price = smartPhone.Price; smartphoneUpdate.Color = smartPhone.Color; smartphoneUpdate.Brand = smartPhone.Brand; db.SubmitChanges(); return(true); } else { return(false); } }
public bool updateSmartPhone(Smartphone smartPhone) { bool rs = new SmartPhoneDAO().updateSmartPhone(smartPhone); return(rs); }
public bool addSmartPhone(Smartphone smartPhone) { bool rs = new SmartPhoneDAO().addSmartPhone(smartPhone); return(rs); }
partial void DeleteSmartphone(Smartphone instance);
partial void UpdateSmartphone(Smartphone instance);
partial void InsertSmartphone(Smartphone instance);