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


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


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

            ObjectMapper.Map(input, incidentType);
        }