Exemple #1
0
        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);
        }
Exemple #2
0
 public bool Create(DmCompanyDailyT data)
 {
     data.CompanyDailyId = NormalHelper.GenerateNormalKey();
     dbContext.DmCompanyDailyT.Add(data);
     return(dbContext.SaveChanges() > 0);
 }