Possible DataProvider's
Posted: Wed 23 Jan 2013 10:30
I deployed LinqConnect to my solution, which communicates with SQL Server and SQLite databases. I've created two DataContext's with attributes:
and
When I use CennikiDataContext (SqlDataProvider) with System.Data.SqlClient.SqlConnection everything is OK.
When I try to use CennikiDataContextLite (SQLiteDataProvider) with System.Data.SQLite.SQLiteConnection(the open-source one http://system.data.sqlite.org/index.htm ... index.wiki) i have an exception during creation of DataContext:
Is it possible to configure DataContext to use System.Data.SQLite.SQLiteConnection?
Code: Select all
[Devart.Data.Linq.Mapping.Provider(typeof(Devart.Data.SqlServer.Linq.Provider.SqlDataProvider))]
public partial class CennikiDataContext : DataContext
Code: Select all
[Devart.Data.Linq.Mapping.Provider(typeof(Devart.Data.SQLite.Linq.Provider.SQLiteDataProvider))]
public class CennikiDataContextLite : CennikiDataContext
When I try to use CennikiDataContextLite (SQLiteDataProvider) with System.Data.SQLite.SQLiteConnection(the open-source one http://system.data.sqlite.org/index.htm ... index.wiki) i have an exception during creation of DataContext:
Code: Select all
Invalid connection type. Expected Type: System.Data.SQLite.SQLiteConnection, Actual Type: Devart.Data.SQLite.SQLiteConnection