public bool Update(ThuChi obj) { try { var thuChi = db.ThuChi.Find(obj.ID); thuChi.Ten = obj.Ten; thuChi.SoTien = obj.SoTien; thuChi.Ngay = obj.Ngay; db.SaveChanges(); return(true); } catch (Exception) { return(false); } }
public long Insert(ThuChi obj) { db.ThuChi.Add(obj); db.SaveChanges(); return(obj.ID); }