public async Task <IHttpActionResult> Get() { try { var result = await _repo.GetAllAddressesAsync(); var mapped = _mapper.Map <IEnumerable <AddressInfoModel> >(result); return(Ok(mapped)); } catch (Exception ex) { return(BadRequest(ex.Message)); } }
public async Task <IHttpActionResult> Get() { try { var result = await _repo.GetAllAddressesAsync(); var mapped = _mapper.Map <IEnumerable <AddressInfoModel> >(result); return(Ok(mapped)); } catch (Exception ex) { return(BadRequest(ex.Message)); } }