public async Task <IActionResult> Get(Guid id) { var result = await _contactManager.GetAsync(id); if (result.IsSuccess) { var resultDto = _mapper.Map <ContactListDto>(result.Data); return(Ok(resultDto)); } return(BadRequest(new { Message = result.Message })); }
public IActionResult Get(Guid id) { return(new WebApiGet <Contact?>(this, () => _manager.GetAsync(id), operationType: OperationType.Read, statusCode: HttpStatusCode.OK, alternateStatusCode: HttpStatusCode.NotFound)); }