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 980975
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T04:28:08+00:00 2026-05-16T04:28:08+00:00

Someone here asked: Linq-To-Sql enables calling SPs. If this SP executes an update/delete/insert, do

  • 0

Someone here asked:

“Linq-To-Sql enables calling SPs. If this SP executes an update/delete/insert, do I need to SubmitChanges() after it?”

And the answer was:

“No you don’t. The code will work. Submit changes is only concerned with modified LINQ to SQL objects and not stored procs.”

I would just like to clarify:

(Please excuse me, I’m relatively new to LINQ)

Yes, but won’t a stored procedure bypass the datacontext object and modify the database itself? (whereas linq modifies the datacontext object only, until the datacontext.submitchanges method is called, where it then modifies the database)

Can I have a stored procedure modify my datacontext object somehow? Does it already do this?

Can I have it so that

  • if I call a SP with linq (and I’m assuming that it directly modifies the database),
  • then use linq to modify my datacontext object, and submit the changes I made to my datacontext object,

the two different changes I made (One with the SP, the other with Linq to my datacontext) won’t interfere?

What I really want is a way to have my stored procedures modify my datacontext. Is this possible?

I should mention that I’m converting a website from SQL to LINQ that has mainly stored procedures and trying to pick my battles with which stored procedures to convert to LINQ and which to keep in SQL and just make SP calls to them with LINQ.

Thank you for your help, -Jeff

  • 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-16T04:28:08+00:00Added an answer on May 16, 2026 at 4:28 am

    FWIW, our litmus test is any trivial ‘crud’ type PROC which inserts / updates a single record can move across to an ORM

    However, we tend to leave the more advanced procs (batch updates, or highly performance sensitive ones) ‘as is’.

    But yes, you will need to have called SubmitChanges() before calling a Proc which is dependent on the state of data changed in the DataContext

    Possibly unrelated, if you need to control units of work, look at putting TransactionScopes around your code?

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

Sidebar

Related Questions

Ok, I know someone here has tried this ninja-elite level of coding before. Essentially
This question is a follow on from the one that was asked here .
Apologies if this question has been asked before. I'm hoping that someone can step
Someone on here recently recommended BWToolkit, and it really impressed me, so I started
Someone posted a great little function here the other day that separated the full
Can someone point me to an article (or discuss here) that explains how an
Can someone explain the syntax in the source attribute here? What the heck is
Someone asked me how familiar I am with VC++ and how familiar I am
In continuation to my question asked here , i have created a test app
I've searched SO and this question seems to have been asked multiple times, but

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.