Devart.Data.Linq.Provider.DataProvider is abstract class.
-
- Posts: 1
- Joined: Wed 04 Aug 2010 23:58
Devart.Data.Linq.Provider.DataProvider is abstract class.
I've been trying to follow the example from the help on LinqConnect, but am getting the following error when trying to construct my datacontext:
Devart.Data.Linq.Provider.DataProvider is abstract class.
Here is my code:
class SystemDataContext:DataContext
{
public SystemDataContext(IDbConnection connection)
: base(connection)
{
}
public SystemDataContext(string connectionString)
: base(connectionString)
{
}
public SystemDataContext()
: base(Status.ConnectionString)
{
}
public Table Sessons
{
get
{
return GetTable();
}
}
}
Devart.Data.Linq.Provider.DataProvider is abstract class.
Here is my code:
class SystemDataContext:DataContext
{
public SystemDataContext(IDbConnection connection)
: base(connection)
{
}
public SystemDataContext(string connectionString)
: base(connectionString)
{
}
public SystemDataContext()
: base(Status.ConnectionString)
{
}
public Table Sessons
{
get
{
return GetTable();
}
}
}
-
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
The point is that the Devart.Data.Linq.DataContext class can use different data providers to connect to different DBMSs. Thus, when a DataContext instance is created, it should know what data provider to use. You can specify this data provider, e.g., by setting the ProviderAttribute class attribute for SystemDataContext. For dotConnect for Oracle, the line needed will look like
Please tell us if this helps.
Code: Select all
[ProviderAttribute(typeof(Devart.Data.Oracle.Linq.Provider.OracleDataProvider))]
class SystemDataContext:DataContext
-
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
Re: Devart.Data.Linq.Provider.DataProvider is abstract class.
Hi,
i have found this post and tried already the solution suggested but unfortunately it is not working.
I downloaded the 30 days trial version and try to connect linq to sqlite.
This is my DataContext:
[ProviderAttribute(typeof(Devart.Data.SQLite.Linq.Provider.SQLiteDataProvider))]
public partial class MyDataContext : Devart.Data.Linq.DataContext
During the creation of a new context I receive the exception:
"Devart.Data.Linq.DataProvider is abstract class."
Any help appreciated.
Thx in advance.
BR
i have found this post and tried already the solution suggested but unfortunately it is not working.
I downloaded the 30 days trial version and try to connect linq to sqlite.
This is my DataContext:
[ProviderAttribute(typeof(Devart.Data.SQLite.Linq.Provider.SQLiteDataProvider))]
public partial class MyDataContext : Devart.Data.Linq.DataContext
During the creation of a new context I receive the exception:
"Devart.Data.Linq.DataProvider is abstract class."
Any help appreciated.
Thx in advance.
BR
Re: Devart.Data.Linq.Provider.DataProvider is abstract class.
Could you please send us a small test project with test database, with which this error occurs, so that we are able to investigate this issue in more details and find the solution for you in a shortest time.
Re: Devart.Data.Linq.Provider.DataProvider is abstract class.
Hi,
i think i already solved the problem myself.
The problem was that i tried to use the Devart.Data.Linq.DataContext, Devart.Data.Linq.Mapping.MappingSource and the Devart.Data.Linq.Table in an already existing object model (dbml-file).
I changed everything back to System.Data.Linq and it works.
BR
i think i already solved the problem myself.
The problem was that i tried to use the Devart.Data.Linq.DataContext, Devart.Data.Linq.Mapping.MappingSource and the Devart.Data.Linq.Table in an already existing object model (dbml-file).
I changed everything back to System.Data.Linq and it works.
BR
Re: Devart.Data.Linq.Provider.DataProvider is abstract class.
LinqConnect and Microsoft LINQ to SQL are two different ORM solutions and, thus, different models should be created - LinqConnect model (*.lqml) and LINQ to SQL model (*.dbml), - and different classes, assemblies, code generation, etc., are used.toSilence wrote:The problem was that i tried to use the Devart.Data.Linq.DataContext, Devart.Data.Linq.Mapping.MappingSource and the Devart.Data.Linq.Table in an already existing object model (dbml-file).
For more information about LinqConnect please refer to:
https://www.devart.com/linqconnect/
https://www.devart.com/linqconnect/docs/