Return input type of generic with type constraint in LINQ to Entities (EF4.1)

前端 未结 4 1295
春和景丽
春和景丽 2021-02-20 18:03

I have a simple extension method for filtering a LINQ IQueryable by tags. I\'m using this with LINQ to Entities with an interface of:

public interface ITaggable
         


        
4条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-20 18:16

    You don't need that Cast at the end as dlev mentioned.

    I assume the product class implements ITaggable? I think removing the Cast will fix the problem.

提交回复
热议问题