DateTime constructor in LINQ expressions

Mar 9, 2015 at 9:24 PM
After some debugging today I found out that Vita's LINQ to SQL parser does not support DateTime constructors. Here's an example in the spirit of the Books model of the unit tests:
books.Where(b => b.PublishedOn > new DateTime(2015, 3, 9))
To make this work one needs to store the new DateTime(..) expression into a variable and use that in the LINQ expression. Looking at the code I have the feeling that it wouldn't be too hard to make this work, but in case it isn't it would at least be nice to document this detail.

Mar 9, 2015 at 9:26 PM
that's a good point, will look into this.