开发者

LINQ to SQL: is there a complete list of supported IQueryable extension methods?

开发者 https://www.devze.com 2022-12-13 12:00 出处:网络
I\'m looking for such list for LINQ to SQL. Ideally, I\'d like to have a list of other supported methods (or members - e.g. con开发者_运维知识库structors), e.g. for DateTime type.Yes, although less co

I'm looking for such list for LINQ to SQL. Ideally, I'd like to have a list of other supported methods (or members - e.g. con开发者_运维知识库structors), e.g. for DateTime type.


Yes, although less complete than for L2E. See also Data Types and Functions. This includes DateTime and DateTimeOffset.


http://msdn.microsoft.com/en-us/library/bb337580.aspx . All those extension methods are documented as members of IQueryable.

Rembmer that IQueryable implements IEnumerable, so anything that IEnumerable implements is also available on IQueryable, with the caveat that some of those methods don't work! In particular, anything that uses a custom comparator will compile correctly, but will get a run-time error from LINQ to SQL. Also true for .Take() and .Skip() with non-numeric values.

0

精彩评论

暂无评论...
验证码 换一张
取 消