public int Insert(T_SMS_MESSAGE entity) { using (var dbContext = new DuPont_TestContext()) { dbContext.T_SMS_MESSAGE.Add(entity); return(dbContext.SaveChanges()); } }
public int Update(T_SMS_MESSAGE entity) { using (var dbContext = new DuPont_TestContext()) { var dbEntry = dbContext.T_SMS_MESSAGE.Find(entity.Id); if (dbEntry != null) { ClassValueCopyHelper.Copy(dbEntry, entity); return(dbContext.SaveChanges()); } } return(0); }
public int Delete(T_SMS_MESSAGE entity) { throw new NotImplementedException(); }