Just a quick post to say that LinqToLfsWorld 1.0 has been released; you can grab it from the project homepage on codeplex.com.
Whilst the interface hasn't changed, under the bonnet the expression
parsing code has been vastly improved and you can now do a lot more
with it, compared to the 0.8 release from the beginning of the month.
For example, with the preview code you couldn't write a query such as:
var stat = from stats in context.RacerStats
where stats.RacerName == GetRacerName()
select stats;
.. the point here being that the expression parser couldn't evaluate
local expressions, i.e. any expression which didn't contain a parameter
expression from inside the query itself (in the example above, this
local expression would be the call to GetRacerName()). Now though, all
expressions which can be evaluated before the query is even looked at are evaluated down to a constant value. This means you can call any method or access any property you like from inside the query.
Some of the common selection methods are now supported also; you can directly call Single, SingleOrDefault, First, FirstOrDefault, Last, LastOrDefault and Count on an LfsWorldContext query. You can also call Select,
provided the query only selects either a single entity or a list of
entities. In other words, you cannot create an anonymous type from
these queries. This limitation is trivial however, since you can just
convert your results into a list and use plain Linq To Objects to
select only the fields you need. The example website included with the
download demonstrates this.
This released also fixed a number of bugs which were flagged up from
testing the preview version, mainly to do with caching and the
expression engine.
There are a couple of issues I'd like to sort out with regards to
serialization, which will come out as some sort of '1.0.1' release
perhaps. Over the next week or so I'm also going to give you a full run
down of each type of query you can perform with this library on this
very site.
If anyone is using the library and finds any issues with it, please direct them to the issue tracker on the project home page.