public async Task <HttpResponseMessage> GetAllPersons() { var mapper = restPersonMapperConfig.CreateMapper(); List <RestPerson> restPersonList = mapper.Map <List <RestPerson> >(await defaultService.ReturnAllPersons()); return(Request.CreateResponse(HttpStatusCode.OK, restPersonList)); }
public HttpResponseMessage GetAllPersons() { var mapper = restPersonMapperConfig.CreateMapper(); List <RestPerson> list = mapper.Map <List <RestPerson> >(defaultService.ReturnAllPersons()); return(Request.CreateResponse(HttpStatusCode.OK, list)); }