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

  • Home
  • SEARCH
  • 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 512095
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:17:05+00:00 2026-05-13T07:17:05+00:00

I just started with ASP.NET MVC 1.0. I’ve read through some tutorials but I

  • 0

I just started with ASP.NET MVC 1.0. I’ve read through some tutorials but I don’t have any good ideas on how to build my model.

I’ve been experimenting with LINQ to SQL. Can’t say I like it that much, but I’ll give it a try. I prefer using SQL Stored Procedures, but it doesn’t seem to work very good together with the optional parameters in my stored procedures.

The project is a prototype, but I would like to start with a good design right away.

The database will probably contain around 50 tables and stored procedures will be used for all queries and updates. Some procedures will also return multiple results. How would the best way to design this model?

All and any ideas are welcome. Should I even use LINQ to SQL? Should I design my stored procedures to only return one result? I feel a little bit lost.

  • 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-13T07:17:05+00:00Added an answer on May 13, 2026 at 7:17 am

    You can use stored procedures with LINQ. You simply need to replace the autogenerated statements on your entities with your stored procs. Look at the properties for the entity (table) in the designer to change these. Your stored procedures won’t be able to return multiple results as they need to map onto a collection of either one of your entities or an autogenerated entity, i.e, onto a collection of a single class.

    Having said all that, I’d give it a go without using stored procedures. The LINQ code is fully parameterized so you already have this benefit. You’ll find that LINQ allows you to easily build up queries alleviating your need for the optional parameters in your stored procs and, likely, resulting in more efficient queries as you don’t need to build extra logic into your query to handle the optional parameters. Once you start using LINQ I think you’ll find that the power and expressiveness in the code will make you forget about using your stored procedures.

    You may still have a need for stored procs or table-valued functions for complex queries — that’s ok. If they map onto an existing entity, you can simply drag the proc/function onto the entity in the designer and you get a nice method on your data context that runs your SQL and returns collections of that entity. If not, I often create a view for the proc/function schema, use that as an entity, and attach the proc/function to it.

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

Sidebar

Related Questions

Or I don't understand this at all. I have started my ASP.NET MVC application
I'm an everyday C#/ASP.NET MVC/Visual Studio user and i've just started a project in
I just got started running UI tests against my ASP.NET MVC application using WatiN.
I have an ASP.NET MVC 3 application, WouldBeBetter.com , currently hosted on Windows Azure.
I just started today to use MVC T4 and I really want to keep
I have just started looking at JqueryMobile and want to know if the following
In ASP.NET MVC 2, TempData values persist until the session ends or until they
VS2010 Ultimate, ASP.NET MVC 3 w/Razor. I've created a custom view engine in my
I am currently experimenting with dynamically loaded areas with ASP.NET MVC 3 RC. I've
I'm using a framework which uses the MVC paradigm. It's CodeIgniter, but my question

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.