public IEnumerable <GetResidentQueryResult> GetAllWithoutApartment( [FromServices] IResidentRepository repository, [FromServices] IMapper mapper ) { var user = User.Claims.FirstOrDefault(x => x.Type == "user_id")?.Value; var result = repository.GetAllWithoutApartment(user); return(mapper.Map <List <GetResidentQueryResult> >(result)); }