public ReportContract GetFromReport(int reportId) { var reportContract = _uow.ReportRepository.Get().FirstOrDefault(x => x.Id == reportId).ToContract(); //var list = new List<WasteContract>(); foreach (var article in reportContract.Articles) { article.Waste = _wasteRepo.Get().FirstOrDefault(x => x.ARTNR == article.WasteId).ToContract(); } return(reportContract); }
public List <WasteContract> Get() { return(_wasteRepo.Get().ToContracts()); }