Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5937543
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T15:33:23+00:00 2026-05-22T15:33:23+00:00

Update from 2017: Realistically, the answer is no, and even if there were you

  • 0

Update from 2017:

Realistically, the answer is no, and even if there were you should be extremely cautious of using it.

There are really only two ways to attack this problem:

a) Bite the bullet and convert everything manually and painstakingly and with some method of verification to check that everything continues to behave as intended, like unit/regression tests. Use tools like Linqer, if available, as assistance, to solve a part of the problem.

b) Start over from scratch.

There is no option c) to have something else handle everything neatly and automatically, and it could not possibly cover all cases. There are many things T-SQL can do that LINQ can’t (updates, inserts and deletes spring to mind), and many things that you would be better off doing a different way in C# (like cursors).

Very few problems like this get well-engineered, exhaustive solutions that can be trusted not to regress functionality (like commercial VB6 to VB.NET converters that could justify spending enormous effort because of the sheer volume of potential customers out there, and where you can pick up a phone or a lawyer if something goes wrong), so if such a tool existed you should be extremely careful. The translation from the LINQ-compatible subset of SQL to LINQ is a bounded problem that is well-understood by the and I think Linqer can be trusted.

This question was trying to suss out a tool that could assist with option a) but I imagine many people reading this are looking for option c). There is a subset of this question and answer that is not a horrible idea, but it does not automate away the remaining burden, since even many of the simple stored procedures did more than querying in a LINQ-expressible form. It was still far too untenable to do option a) for any of the projects I mentioned.


Original question follows:

I have a few projects to maintain that use a lot of SQL Server stored procedures (in T-SQL). I know how to maintain them, but since there are many tools to automatically convert between different languages, I’m wondering if there’s any tool to convert the stored procedures to C# code?

I do NOT want to convert them to CLR Stored Procedures; I simply want to migrate the logic in my data layer to the C# end of my project and automate the grunt work. Most of the stored procedures (maybe 70%?) are simple “SELECT * FROM table WHERE id = @id” affairs, and they could be done just as well with Entity Framework.

I know that it’s not a straight line between T-SQL and C# as it is from VB.NET to C# and that conversion isn’t as straightforward; you will need to introduce a data layer in C#, for example, and some things like cursors don’t have corresponding concepts. I just want to move off of stored procedures without the repetitive manual labor if possible.

Since this has been put into question by faulty assumptions: I already know T-SQL, and given the code of any one of these stored procedures I could tell you what they do. There are very good practical reasons why I do not want the logic to continue residing in stored procedures.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T15:33:23+00:00Added an answer on May 22, 2026 at 3:33 pm

    Check out Linqer:

    Linqer is a SQL to LINQ converter
    tool. It helps you to learn LINQ and
    convert your existing SQL statements.

    Not every SQL statement can be
    converted to LINQ, but Linqer covers
    many different types of SQL
    expressions.

    Because LINQ is a part of C#, it is
    sensitive to data types conversion.
    Linqer performs required type castings
    in the produced LINQ statements.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there really no way of forcing an app update from the app store
(Update - from comments) Question: Is there any advantage of using one extension method
I want to know if there's any way to update from all versions (Example:
I'm using SqlBulkCopy to insert/update from a .net DataTable object to a SQL Server
I'm using SVN 1.6.3 and TortoiseSVN 1.6.6. Periodically when I do an update from
Is there any way to prevent the CQL command Update from creating a new
If no, is there any way to cancel the UPDATE from out of the
I would like to update from cordova-1.7.1.js to cordova-1.8.0.js but there's no way i
UPDATE : from what I'm hearing, I was imagining the problem I describe below.
I'm calling collection update from ruby driver to mongodb and gets a return code

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.