Exemplo n.º 1
0
        public async Task <IActionResult> GetEmployees()
        {
            var repo  = new TableStorageRepository();
            var cards = await repo.GetAllEntities();

            var employeesToReturn = _mapper.Map <IEnumerable <EmployeeListDto> >(cards);

            if (!cards.Any())
            {
                return(NotFound());
            }
            return(Ok(employeesToReturn));
        }