継承されたクラスに、クエリに where 句を提供する機会を与えたいと考えています。これは可能ですか?
protected IQueryable<EntityResult> GetEntities(ETBDataContext pContext)
{
return from e in pContext.Entities
where e.StatusCode == "Published"
//is there a way to add a dynamic where clause here?
//I would like to ask the inherited class for it's input:
&& e.OtherColumn == "OtherValue" // <-- like GetWhere(e)?
//without having to select the column
orderby e.PublishDate descending
select new EntityResult
{
Name = e.Name,
Link = e.Link
};
}
前もって感謝します!!!!!!!!!!