Re: [sqlite] Delegates with linq

2012-02-03 Thread Truls Haaland
> I've reviewed your sample code.  It would seem that the difference between > the two method overloads is that working one resolves to: I will look into this. Thank you so much for all your effort and help. Now I'm off to do some serious googling. Truls.

Re: [sqlite] Delegates with linq

2012-02-02 Thread Joe Mistachkin
DISCLAIMER: I am not an expert on all the ways to use LINQ and Entity Framework. I've reviewed your sample code. It would seem that the difference between the two method overloads is that working one resolves to: public static TSource FirstOrDefault( this IEnumerable

Re: [sqlite] Delegates with linq

2012-02-02 Thread Truls Haaland
> Without a more complete example, it's hard to say exactly.  > However, I suspect it may have something to do with the type(s) of "Id" and > "firstId". Whole project is at: https://github.com/trulsu/SQLiteTest The table is defined as: CREATE TABLE SqLite ( Id UNIQUEIDENTIFIER PRIMARY KEY

Re: [sqlite] Delegates with linq

2012-01-31 Thread Joe Mistachkin
Truls Haaland wrote: > > Does this have something with the first being C# 2 and the second C# 3? > Without a more complete example, it's hard to say exactly. However, I suspect it may have something to do with the type(s) of "Id" and "firstId". Also, since the underlying storage is of the

[sqlite] Delegates with linq

2012-01-31 Thread Truls Haaland
Given a table (SqLite) with an Id that is defined as a UNIQUEIDENTIFIER (stored as TEXT) I get the following results (firstId is a Guid matching the first entry): This fails (returns zero rows):   connection.SqLite.FirstOrDefault(s => s.Id == firstId ) This works (returns one row):