コード例 #1
0
 public async Task CreateOrEdit(CreateOrEditProjectInstructionDto input)
 {
     if (input.Id == null)
     {
         await Create(input);
     }
     else
     {
         await Update(input);
     }
 }
コード例 #2
0
        protected virtual async Task Create(CreateOrEditProjectInstructionDto input)
        {
            var projectInstruction = ObjectMapper.Map <ProjectInstruction>(input);


            if (AbpSession.TenantId != null)
            {
                projectInstruction.TenantId = (int?)AbpSession.TenantId;
            }


            await _projectInstructionRepository.InsertAsync(projectInstruction);
        }
コード例 #3
0
        protected virtual async Task Update(CreateOrEditProjectInstructionDto input)
        {
            var projectInstruction = await _projectInstructionRepository.FirstOrDefaultAsync((int)input.Id);

            ObjectMapper.Map(input, projectInstruction);
        }