npgsql LINQ creates SQL Server sql syntax npgsql LINQ creates SQL Server sql syntax postgresql postgresql

npgsql LINQ creates SQL Server sql syntax


DataContext

DataContext is LinqToSql. LinqToSql is for SqlServer only.

Perhaps you meant to use LinqToEntities and ObjectContext?


If one wants to use LINQ to SQL for RDBMS other than Microsoft SQL Server, a third-party assembly is required. DBLinq is a project that provides LINQ to SQL functionality for other (open-source) databases.

http://code.google.com/p/dblinq2007/

Npgsql can be configured as a db provider for Entity Framework following the documentation on this Npgsql blog:

http://npgsql.com/index.php/2009/08/how-to-set-up-entity-framework-npgsql-part-1/