SQL Server Compact – Compact yet capable : LINQ with SQL Server Compact (a.k.a. DLINQ with SQL CE)
Nella beta 2 di “Orcas”, Linq to Sql supporta anche SQL Compact come Data Base!
Ovviamente le funzionalità supportate sono limitate rispetto al supporto per SQL Server:
Differences between LINQ to SQL for SQL Server and SSCE:
- Notice the command line tool I referred you to for generating the object-relational mapping. While SQL Server will have a nice designer to do the same thing, atleast till Orcas, SQL Compact will have to do with SqlMetal command line tool. No designer support. (If you prefer command line tools like me, you shall have no problem!)
- Note: SQLMetal extracts SQL metadata from your database and generates a source file containing entity class declarations. Alternatively, you can split the process into two steps, first generating an XML file representing the SQL metadata and then later translating that XML file into a source file containing declarations. This split process allows you to retain the metadata as a file so you may edit it.
- LINQ queries are eventually mapped to SQL queries. Since SQL supported by SSC is a strict subset of that on SQL Server, LINQ follows suit. (To see the SQL which is generated, set db.Log = Console.Out where db is the DataContext.).
- Stored procedures and views are not supported by SSC, and so will not be supported through LINQ to SQL either.