Custom data provider?

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

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

These operations are expressed in a sql query using select / insert / update / delete and custom keywords for specific database operations.

I wonder what the path to this result is. I can ask a question in two points of view: in an ideal world and in a practical world.

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

PS: I think of these approaches:

  • creating a custom ADO.Net provider (IDbCommand, IDbConnection, etc.)
  • user linq provider entry (which relies on the first)
  • maybe write an EF provider
+4
source share
1 answer

Linq is an integrated language only. This is the syntax for the query expression, but in the case of a database query, it simply creates an expression tree that needs to be translated into SQL and somehow executed. For this, the ADO.NET provider is used. The same states for the Entity platform that rely on the ADO.NET provider to access the database. Therefore, if you want to create some implementation, you should start with the ADO.NET provider.

+1
source

Source: https://habr.com/ru/post/1347678/


All Articles