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