Ejemplo n.º 1
0
 public async Task CreateOrEdit(CreateOrEditAttachmentEntityTypeDto input)
 {
     if (input.Id == null)
     {
         await Create(input);
     }
     else
     {
         await Update(input);
     }
 }
Ejemplo n.º 2
0
        protected virtual async Task Create(CreateOrEditAttachmentEntityTypeDto input)
        {
            var attachmentEntityType = ObjectMapper.Map <AttachmentEntityType>(input);


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


            await _attachmentEntityTypeRepository.InsertAsync(attachmentEntityType);
        }
Ejemplo n.º 3
0
        protected virtual async Task Update(CreateOrEditAttachmentEntityTypeDto input)
        {
            var attachmentEntityType = await _attachmentEntityTypeRepository.FirstOrDefaultAsync((int)input.Id);

            ObjectMapper.Map(input, attachmentEntityType);
        }