There are a couple of resources on the Internet describing preview 2 of subsonic with Astoria :
and working sample at
http://code.msdn.microsoft.com/SubSonicForADONETDS
I applied all respective changes to subsonic tt(s) , however didn't manage to make MSDN project work. After eliminating :
a) Astoria didn't like private DB() { } in QuerySurface.tt , so I blindly made constructor public
b) Not sure how to generate compound primary key
<# if(EnableForUseWIthAstoria) {
#> [System.Data.Services.Common.DataServiceKey("<#=pk#>")] <# }#>
results in
[System.Data.Services.Common.DataServiceKey("")]
instead of
[System.Data.Services.Common.DataServiceKey("OrderID", "ProductID")]
so just excluded the table.
The current obstacle
var q = from cust in ctx.Customers
where cust.CustomerID == "ROMEY"
select cust;
Customers c = q.First();
results in exception: Resource not found for the segment 'Customers'
Has anyone tried that or knows another the latest and greatest sample existence ?
See this issue for a demo template for data services: