public int Update(NtfNotification newNotification) { NtfNotification oldNotification = RetrieveNotificationById(newNotification.NotificationId); context.Entry(oldNotification).State = EntityState.Deleted; context.Entry(newNotification).State = EntityState.Modified; return context.SaveChanges(); }
internal void update(SecUser oldUser, SecUser newUser) { newUser.CreatedAt = oldUser.CreatedAt; context.Entry(oldUser).State = EntityState.Deleted; context.Entry(newUser).State = EntityState.Modified; newUser.UpdatedAt = DateTime.Now; context.SecUser.Update(newUser); }
public void UpdateModule(SysModule module) { SysModule oldModule = RetrieveById(module.ModuleId); context.Entry(oldModule).State = EntityState.Deleted; context.Entry(module).State = EntityState.Modified; module.UpdatedAt = DateTime.Now; context.SaveChanges(); }
internal void update(QmsKnowledgebase oldEntity, QmsKnowledgebase newEntity) { context.Entry(oldEntity).State = EntityState.Deleted; context.Entry(newEntity).State = EntityState.Modified; }
internal void update(T oldEntity, T newEntity) { context.Entry(oldEntity).State = EntityState.Deleted; context.Entry(newEntity).State = EntityState.Modified; newEntity.UpdatedAt = DateTime.Now; }