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

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

Postby chriserickson » Thu 05 Aug 2010 00:00

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();
}
}
}
chriserickson
 
Posts: 1
Joined: Wed 04 Aug 2010 23:58

Postby AndreyR » Fri 06 Aug 2010 12:19

We have answered you by e-mail.
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Postby lytico » Wed 25 Aug 2010 14:50

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

Postby StanislavK » Thu 26 Aug 2010 17:05

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.
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Postby lytico » Mon 30 Aug 2010 15:37

thanks, that helped!
of course, i got another error, but this is another story.
lytico
 
Posts: 2
Joined: Wed 25 Aug 2010 14:14

Postby StanislavK » Tue 31 Aug 2010 08:29

Feel free to contact us if you encounter any problems using LinqConnect.
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

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

Postby toSilence » Fri 10 Jul 2015 09:55

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
toSilence
 
Posts: 5
Joined: Fri 10 Jul 2015 09:25

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

Postby MariiaI » Fri 10 Jul 2015 11:28

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.
MariiaI
Devart Team
 
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

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

Postby toSilence » Mon 13 Jul 2015 11:54

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
toSilence
 
Posts: 5
Joined: Fri 10 Jul 2015 09:25

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

Postby MariiaI » Tue 14 Jul 2015 05:44

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/
MariiaI
Devart Team
 
Posts: 1472
Joined: Mon 13 Feb 2012 08:17


Return to LinqConnect (LINQ to SQL support)