private void Create(AssignmentTableInput AssignmentTableInput) { var AssignmentTableEntity = ObjectMapper.Map <AssignmentTable>(AssignmentTableInput); SetAuditInsert(AssignmentTableEntity); AssignmentTableRepository.Insert(AssignmentTableEntity); CurrentUnitOfWork.SaveChanges(); }
public void CreateOrEditAssignmentTable(AssignmentTableInput AssignmentTableInput) { if (AssignmentTableInput.Id == 0) { Create(AssignmentTableInput); } else { Update(AssignmentTableInput); } }
private void Update(AssignmentTableInput AssignmentTableInput) { var AssignmentTableEntity = AssignmentTableRepository.GetAll().Where(x => !x.IsDelete).SingleOrDefault(x => x.Id == AssignmentTableInput.Id); if (AssignmentTableEntity == null) { } ObjectMapper.Map(AssignmentTableInput, AssignmentTableEntity); SetAuditEdit(AssignmentTableEntity); AssignmentTableRepository.Update(AssignmentTableEntity); CurrentUnitOfWork.SaveChanges(); }
public void CreateOrEditAssignmentTable([FromBody] AssignmentTableInput input) { AssignmentTableAppService.CreateOrEditAssignmentTable(input); }