public bool Update(ThuChiCSDL obj) { try { var thuChi = db.ThuChiCSDLs.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(ThuChiCSDL obj) { db.ThuChiCSDLs.Add(obj); db.SaveChanges(); return(obj.ID); }