Beispiel #1
0
        public IEnumerable <GetResidentQueryResult> GetAll(
            [FromServices] IResidentRepository repository,
            [FromServices] IMapper mapper
            )
        {
            var user   = User.Claims.FirstOrDefault(x => x.Type == "user_id")?.Value;
            var result = repository.GetAll(user);

            return(mapper.Map <List <GetResidentQueryResult> >(result));
        }
 public IEnumerable <ResidentEntity> GetAllResidents()
 {
     try
     {
         return(residentRepo.GetAll());
     }
     catch (Exception)
     {
         logger.LogError("Error occoured in ResidentService.GetAllResidents");
         throw;
     }
 }