I'm using the repository with the Unit of work pattern based on:
Their Get function looks like:
public virtual IEnumerable<TEntity> Get(
Expression<Func<TEntity, bool>> filter = null,
Func<IQueryable<TEntity>, IOrderedQueryable<TEntity>> orderBy = null,
string includeProperties = "")
Now I want to get a List of rows as an output.
The query will also have a WHERE IN clause like:
SELEcT *
FROM ...
INNER JOIN ...
WHERE homeId in (select homeId ....)
I have the list of home ids:
List<int> homeIdList = ...
How can I build this query using the Get method above?
Get(x => x.Id == cityId, includeProperties: "CityBlock, CityBlock.Homes")
The above is a query that is similiar to what I want, but I want to limit the Homes to be where their id is in the List homeIdList.
Possible?