Hi,
I have a strange problem with EF4 context being accessed via ODATA/Ado.NET Dataservices/WCF Data Services.
I have a table with primary key Id (type "uniqueidentifier" stored in binary).
When I do a lookup with a Guid in code directly like
var g = new new Guid("1f5994b4-f572-4786-9ccb-9488f351d28b");
var a = ctx.MyTable.Single(v => v.Id == g);
the correct result is returned. (MyTable.Id being a uniqueidentifier type and correctly identified as Guid in .edmx, the sql generated correctly looks for a guid-parameter, the generated where-clause being something like
WHERE [MyTable].[Id] = @p__linq__0 LIMIT 2
-- p__linq__0 (dbtype=Guid, size=0, direction=Input) = 1f5994b4-f572-4786-9ccb-9488f351d28b
When I go via ODATA "http://.../MyService.svc/Mytable(guid'1f5994b4-f572-4786-9ccb-9488f351d28b') nothing is found. The generated sql is wrong, with a where clause of "WHERE MyTable.Id = '1f5994b4-f572-4786-9ccb-9488f351d28b'"
I am using the patched .NET 4.0 assembly from http://sqlite.phxsoftware.com/forums/p/2040/9252.aspx#9252 .
Anybody having similar issues or using ODATA with System.Data.SQLite successfully?
Cheers,
Deacon