コード例 #1
0
        private void Create(AssignmentTableInput AssignmentTableInput)
        {
            var AssignmentTableEntity = ObjectMapper.Map <AssignmentTable>(AssignmentTableInput);

            SetAuditInsert(AssignmentTableEntity);
            AssignmentTableRepository.Insert(AssignmentTableEntity);
            CurrentUnitOfWork.SaveChanges();
        }
コード例 #2
0
 public void CreateOrEditAssignmentTable(AssignmentTableInput AssignmentTableInput)
 {
     if (AssignmentTableInput.Id == 0)
     {
         Create(AssignmentTableInput);
     }
     else
     {
         Update(AssignmentTableInput);
     }
 }
コード例 #3
0
        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();
        }
コード例 #4
0
 public void CreateOrEditAssignmentTable([FromBody] AssignmentTableInput input)
 {
     AssignmentTableAppService.CreateOrEditAssignmentTable(input);
 }