user1687824
user1687824

Reputation: 807

Moving from ADO to ADO.net

I am re-engineering a product which uses ADO communication for connecting to SQL.THe bussiness layer is in c++. The whole queries are written as SP's. I want the product to support SQL 2008 and may be Mysql(haven't finalized).

These are the changes i thought!

  1. Moving the entire communication to ADO.net.
  2. Since moving from SPs to ad-hoc SQL queries might require a lot of effort how about writing a wrapper C# layer which is used by the previous bussines layer which is in c++.
  3. thought of seroiusly looking at some of the ORM tools. But since it involves lot of SP's i feel its better to go stage by stage.

I want feedbacks/suggetions for this. Is this a good trasnition?

Upvotes: 2

Views: 168

Answers (1)

Albin Sunnanbo
Albin Sunnanbo

Reputation: 47068

Based on personal preferences I would create LINQ2SQL or possibly Entity Framework layer to access the database. Both LINQ2SQL and Entity Framework can import definitions for and call stored procedures¹.

I would then gradually convert stored procedures to LINQ code.

¹) Within reasonable limits, SP:s with multiple return sets and selects that is not from a single table must be mapped manually, but it is still possible.

Upvotes: 3

Related Questions