I am working with multiple tables like master and child table. One master has many child record. I just want to fetch child record on conditional based. When i try to get record it gives me following error.
The Include path expression must refer to a navigation property defined on the type
Here is my code
var _vatId = (int)Enumerations.Enumerations.Vat.Standard;
var master = _db.PurchaseOrderMaster.Include(x => x.tbl_PurchaseOrderDetails.Where(a => a.VatId == _vatId)).FirstOrDefault(x => x.Id == PurchaseOrderId);
Why i am doing this because if master has 1000 child records and i just need 100 then i must use where clause to fetch 100 records rather than 1000 records.