Exemplo n.º 1
0
        public IEnumerable <ResourceDTO> GetAll()
        {
            IEnumerable <Resource> categories;

            using (var uow = _uowfactory.CreateUnitOfWork())
            {
                var repo = uow.GetRepo <Resource>();

                categories = repo.GetAll();
            }

            IEnumerable <ResourceDTO> dtos = ResourceMapper.CreateListResourceDTO().Map(categories).ToList();

            return(dtos);
        }