public override async Task <List <DTO.DomainLikeDTO.ProductWithDefect> > AllAsync() { return(await RepositoryDbSet .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) .Include(d => d.Defect).ThenInclude(aa => aa.Description).ThenInclude(t => t.Translations) .Select(e => ProductWithDefectMapper.MapFromDomain(e)).ToListAsync()); }
public override async Task <DTO.DomainLikeDTO.ProductWithDefect> FindAsync(params object[] id) { var productWithDefect = await RepositoryDbSet.FindAsync(id); return(ProductWithDefectMapper.MapFromDomain(await RepositoryDbSet.Where(a => a.Id == productWithDefect.Id) .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) .Include(d => d.Defect).ThenInclude(aa => aa.Description).ThenInclude(t => t.Translations) .FirstOrDefaultAsync())); }
public async Task <List <DAL.App.DTO.DomainLikeDTO.ProductWithDefect> > AllAsyncByDefectId(int defectId) { return(await RepositoryDbSet .Where(a => a.DefectId == defectId).Select(e => ProductWithDefectMapper.MapFromDomain(e)).ToListAsync()); }