4

I have a database which does not provide (yet) c# client library, only a binary tcp or http rest protocol.

I have to write an application that can perform various operations on the DB : CRUD, management, etc.

These operation are expressed in a sql query, with select/insert/update/delete and custom keywords for DB-specific operations.

I'm wondering what is the path to this result. I can ask the question in two point of views : in an ideal world, and in a practical world.

I'd appreciate any feedback !What is the recommended approach, problems encountered, etc.

PS: I'm thinking over these approaches :

  • writing a custom ADO.Net provider (IDbCommand, IDbConnection, etc.)
  • writing a custom linq provider (which relies on the former)
  • maybe writing a EF provider
3
  • 2
    Actually, a LINQ implementation is not tied to any specific infrastructure - it is merely a language construct, hence why LINQ-to-Amazon, or LINQ-to-RIA are possible. Unless you mean LINQ-to-SQL, which is different and not really very extensible. Commented Apr 12, 2011 at 7:39
  • @Marc Gravell: so you mean that the 1st and 2nd points are two separate projects ? By custom linq provider, I was not meaning writing a linq-to-sql provider, but actually a custom repository MyDB repo = new MyDB(); repo.Load<Customer>((c)=>c.CompanyName=="foo corp"); or something like this Commented Apr 12, 2011 at 8:01
  • that doesn't actually show any LINQ ;p just a repository implementation using the Expression API. Which needn't involve ADO.NET etc. Commented Apr 12, 2011 at 8:20

1 Answer 1

1

Linq is just language integrated query. It is syntax to express query but in case of database querying it just creates expression tree which must be translated to SQL and executed somehow. For this execution ADO.NET provider is used. The same states for Entity framework which rely on ADO.NET provider to access the database. So if you want to create some implementation you should start with ADO.NET provider anyway.

Sign up to request clarification or add additional context in comments.

1 Comment

Any solution for this Custom Data Provider

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.