public virtual void Remove(DS_ThongTinDN user) { try { db.DS_ThongTinDNs.DeleteOnSubmit(user); db.SubmitChanges(); } catch (Exception e) { throw new Exception(e.Message); } }
public virtual void Create(DS_ThongTinDN user) { try { this.db.DS_ThongTinDNs.InsertOnSubmit(user); db.SubmitChanges(); } catch (Exception e) { throw new Exception(e.Message); } }
public virtual void Update(DS_ThongTinDN user) { try { DS_ThongTinDN userOld = this.GetById(user.ID); userOld = user; db.SubmitChanges(); } catch (Exception e) { throw new Exception(e.Message); } }
public virtual int Delete(DS_ThongTinDN user) { try { //user.IsDelete = true; db.SubmitChanges(); return 0; } catch (Exception e) { throw new Exception(e.Message); } }