Ejemplo n.º 1
0
        public async Task <IEnumerable <FloorDto> > GetAllFloorsAsync()
        {
            IEnumerable <FloorDto> floors;

            try
            {
                var floorsFromDb = await _floorRepository.GetAllAsync();

                floors = _mapper.Map <IEnumerable <FloorDto> >(floorsFromDb);
            }
            catch (Exception ex)
            {
                _logger.LogError(ex.Message);
                return(null);
            }
            return(floors);
        }