public bool Update(string Id, DmCompanyDailyT data) { var model = dbContext.DmCompanyDailyT.SingleOrDefault(x => x.CompanyDailyId == Id); if (model == null) { return(false); } model = data; dbContext.DmCompanyDailyT.Update(model); return(dbContext.SaveChanges() > 0); }
public bool Create(DmCompanyDailyT data) { data.CompanyDailyId = NormalHelper.GenerateNormalKey(); dbContext.DmCompanyDailyT.Add(data); return(dbContext.SaveChanges() > 0); }