Page 1 of 1

Devart.Data.Linq.Provider.DataProvider is abstract class.

Posted: Thu 05 Aug 2010 00:00
by chriserickson
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();
}
}
}

Posted: Fri 06 Aug 2010 12:19
by AndreyR
We have answered you by e-mail.

Posted: Wed 25 Aug 2010 14:50
by lytico
I have the same problem evaluating Devart.Data.Oracle.Linq (Trial Version 5.70.152 28-Jul-10).

Posted: Thu 26 Aug 2010 17:05
by StanislavK
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

Code: Select all

[ProviderAttribute(typeof(Devart.Data.Oracle.Linq.Provider.OracleDataProvider))]
class SystemDataContext:DataContext 
Please tell us if this helps.

Posted: Mon 30 Aug 2010 15:37
by lytico
thanks, that helped!
of course, i got another error, but this is another story.

Posted: Tue 31 Aug 2010 08:29
by StanislavK
Feel free to contact us if you encounter any problems using LinqConnect.

Re: Devart.Data.Linq.Provider.DataProvider is abstract class.

Posted: Fri 10 Jul 2015 09:55
by toSilence
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

Re: Devart.Data.Linq.Provider.DataProvider is abstract class.

Posted: Fri 10 Jul 2015 11:28
by MariiaI
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.

Posted: Mon 13 Jul 2015 11:54
by toSilence
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

Re: Devart.Data.Linq.Provider.DataProvider is abstract class.

Posted: Tue 14 Jul 2015 05:44
by MariiaI
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).
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.

For more information about LinqConnect please refer to:
https://www.devart.com/linqconnect/
https://www.devart.com/linqconnect/docs/