Example #1
0
        public async Task <ActionResult <AddressViewModel[]> > Get(bool includeConsultants = false)
        {
            try
            {
                var results = await repository.GetAllAddressesAsync();

                return(mapper.Map <AddressViewModel[]>(results));
            }
            catch (Exception)
            {
                return(this.StatusCode(StatusCodes.Status500InternalServerError, "Error in database"));
            }
        }