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