public async Task <bool> CreateEditorial(EditorialContract request) { Editorial editorial = _mapper.Map <Editorial>(request); await _editorialRepository.CreateAsync(editorial); return(true); }
public async Task <Response <bool> > CreateEditorial(EditorialContract request) { Response <bool> response = new Response <bool>(); try { response.Data = await _autorService.CreateEditorial(request); } catch (Exception ex) { response.Header.Code = 500; response.Header.Message = ex.Message; } return(response); }