marqo (1) [Avatar] Offline
#1
Hello,
I'm currently writing an application, in witch the database system could either Microsoft SQL Server or Compact Edition. I'm not sure about the way to take.

I try to use the "LINQ to SQL classes" component in VS2008, witch generate a dbml file and works well with SQL Server version but not with the Compact one.

I try to use the DAAB pattern, but I'm no more able to use Linq to SQL....

Any ideas or experiences to help me ? Thanks!
fabrice.marguerie (224) [Avatar] Offline
#2
Re: Linq with different database type (SQL Server, Compact,....)
Hello,

I've no experience with the Compact Edition, but LINQ to SQL is supposed to work with it. What is the problem that you face? What's the error message?
Which version of SQL Server CE are you using?

Fabrice
jwooley (123) [Avatar] Offline
#3
Re: Linq with different database type (SQL Server, Compact,....)
LINQ to SQL should support CE. However the code generation tools (LINQ to SQL classes and SqlMetal) that shipped with Visual Studio 2008 do not support CE. You will need to manually create the classes and assign the mappings as shown in chapter 7 to work with the other flavors of SQL Server. You may run into some queries that will work differently with CE than full SQL Server due to differences in the underlying implementations of those as well.

Jim