public void EditSubject(ActivitySubjectEntity activitySubjectEntity) { var set = _context.Set <ActivitySubjectEntity>(); var entity = set.Find(activitySubjectEntity.ActivitySubjectId); if (entity == null) { set.Add(activitySubjectEntity); } else { _context.Entry(entity).State = System.Data.Entity.EntityState.Modified; entity.ActivitySubject = activitySubjectEntity.ActivitySubject; entity.SubjectType = activitySubjectEntity.SubjectType; entity.Status = activitySubjectEntity.Status; entity.Seq = activitySubjectEntity.Seq; } _context.SaveChanges(); }
public void EditSubject(ActivitySubjectEntity activitySubjectEntity) { _service.EditSubject(activitySubjectEntity); }