LinqConnect: LINQ to Dataset

Discussion of open issues, suggestions and bugs regarding LinqConnect – Devart's LINQ to SQL compatible ORM
Post Reply
Posts: 1
Joined: Wed 22 Aug 2012 16:11

LinqConnect: LINQ to Dataset

Post by parhelia » Wed 22 Aug 2012 16:24

I've been trying to find documentation in how to create my own DataProvider to extend the base provider class, to utilize a mock database connection, and to use it as a ProviderAttribute in the declaration of the mock DataContext, but I have no luck. This way, I can wrap Devart LinqConnect to build data on a DataSet using .NET via the same Linq codes, so that I do not need to change my Linq codes for the work around. I would like to utilize the models and the data context (as well as the Devart Linq inheritances) generated by Entity Developer and will still work with the standard DataSet, which will be created from the models. This way, I can use Linq in continuous unit tests, where database will not be available.

Is this even possible?

Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Re: LinqConnect: LINQ to Dataset

Post by StanislavK » Mon 27 Aug 2012 12:53

Sorry for the delay.

It isn't possible to override the functionality of LinqConnect DataProviders. More importantly, querying disconnected DataSets is not the proper way to test the code that uses LinqConnect, at least because in this case the larger part of filtering/projecting logic is moved from the server to the client. (Since LinqConnect queries are translated into SQL, which is then executed in the database, they may give different results than 'the same' LINQ to Objects queries.)

Generally, we recommend to create a separated database specifically for testing purposes.

Post Reply