public override async Task <List <ProductCompany> > AllAsync()
 {
     return(await RepositoryDbSet
            .Include(c => c.Company)
            .Include(r => r.Product)
            .ThenInclude(p => p.RouteOfAdministration)
            .Include(r => r.Product)
            .ThenInclude(n => n.ProductName)
            .Include(r => r.Product)
            .ThenInclude(c => c.ProductClassification)
            .Select(e => ProductCompanyMapper.MapFromDomain(e)).ToListAsync());
 }
        public async Task <DAL.App.DTO.ProductCompany> FindAllPerEntity(int id)
        {
            var productCompany = await RepositoryDbSet
                                 .Include(c => c.Company)
                                 .Include(r => r.Product)
                                 .ThenInclude(p => p.RouteOfAdministration)
                                 .Include(r => r.Product)
                                 .ThenInclude(n => n.ProductName)
                                 .Include(r => r.Product)
                                 .ThenInclude(c => c.ProductClassification)
                                 .FirstOrDefaultAsync(m => m.Id == id);

            return(ProductCompanyMapper.MapFromDomain(productCompany));
        }
Exemplo n.º 3
0
 public async Task <BLL.App.DTO.ProductCompany> FindAllPerEntity(int id)
 {
     return(ProductCompanyMapper.MapFromDAL(await Uow.ProductCompanies.FindAllPerEntity(id)));
 }