Trying to query the db for a specific record, this record in the model has an ICollection associated with it. So here's an example:
Let's say a have a bunch of stores:
class StoreLocation {
public int StoreId
public string LocationName
public ICollection<SaleItems> SaleItems
}
class SaleItems {
public int SaleItemId
public string ItemName
public string ItemCost
}
So using entity framework...
How can I search for SaleItems costing less than $5 at a specific store that gets searched for?
var SaleItemsAtStore = _context.StoreLocations
.Where(location => location.StoreId == SomethingUserInputs
var CheapSaleItems = SaleItems...
....not sure where to go with this, or maybe I'm going in the total wrong direction to begin with.