Ejemplo n.º 1
0
 public override async Task <List <DTO.DomainLikeDTO.ProductInOrder> > AllAsync()
 {
     return(await RepositoryDbSet
            .Include(p => p.Order).ThenInclude(m => m.Description).ThenInclude(t => t.Translations)
            .Include(a => a.Product).ThenInclude(aa => aa.ProductName).ThenInclude(t => t.Translations)
            .Include(a => a.Product).ThenInclude(aa => aa.Length).ThenInclude(t => t.Translations)
            .Include(a => a.Product).ThenInclude(aa => aa.Weight).ThenInclude(t => t.Translations)
            .Include(a => a.Product).ThenInclude(aa => aa.ManuFacturerItemCode).ThenInclude(t => t.Translations)
            .Include(a => a.Product).ThenInclude(aa => aa.ShopCode).ThenInclude(t => t.Translations)
            .Select(e => ProductInOrderMapper.MapFromDomain(e)).ToListAsync());
 }
Ejemplo n.º 2
0
        public override async Task <DTO.DomainLikeDTO.ProductInOrder> FindAsync(params object[] id)
        {
            var productInOrder = await RepositoryDbSet.FindAsync(id);

            return(ProductInOrderMapper.MapFromDomain(await RepositoryDbSet.Where(a => a.Id == productInOrder.Id)
                                                      .Include(p => p.Order).ThenInclude(m => m.Description).ThenInclude(t => t.Translations)
                                                      .Include(a => a.Product).ThenInclude(aa => aa.ProductName).ThenInclude(t => t.Translations)
                                                      .Include(a => a.Product).ThenInclude(aa => aa.Length).ThenInclude(t => t.Translations)
                                                      .Include(a => a.Product).ThenInclude(aa => aa.Weight).ThenInclude(t => t.Translations)
                                                      .Include(a => a.Product).ThenInclude(aa => aa.ManuFacturerItemCode).ThenInclude(t => t.Translations)
                                                      .Include(a => a.Product).ThenInclude(aa => aa.ShopCode).ThenInclude(t => t.Translations)
                                                      .FirstOrDefaultAsync()));
        }