MVC as it relates to SQL

  • Hey all . . .

    I'm getting my feet wet with ASP.NET MVC2. My mindset is still within the ASP.NET WebForms and classic ASP paradigm, so this is uncharted territory for me.

    I was just wondering: architecturally, is there anything that I need to be aware of with SQL Server as it relates to MVC?

    Apologies if this question seems vague; I haven't yet gotten deep enough into this topic to know what to ask.

    +--------------------------------------------------------------------------------------+
    Check out my blog at https://pianorayk.wordpress.com/

  • In the MVC architecture, SQL Server is the model.

  • jvanderberg (8/4/2010)


    In the MVC architecture, SQL Server is the model.

    Yep, got that figured out so far! 🙂

    I guess what I'm wondering is if there's anything that I need to worry about when connecting a model entity to SQL. I assume most of the concerns would be on the model side, and that the SQL side (stored procedure calls, parameters, etc.) would pretty much remain the same. Is that a correct assumption?

    +--------------------------------------------------------------------------------------+
    Check out my blog at https://pianorayk.wordpress.com/

  • I might have just answered my own question. For anyone curious, I found the answer here.

    +--------------------------------------------------------------------------------------+
    Check out my blog at https://pianorayk.wordpress.com/

  • Ray, thanks for that link. I'm also trying to look into MVC.

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

  • No problem. I'm finding out that the MVC link on asp.net is a great resource. I'm probably going to end up referencing this page quite a bit.

    +--------------------------------------------------------------------------------------+
    Check out my blog at https://pianorayk.wordpress.com/

  • I'm learning some interesting things about MVC.

    Way back when, I posted a question about whether or not it was better for data processing to occur on the application or on the SQL side. Since then, whenever possible, I've been gearing my code toward that end; data processing occurs within stored procedures, and is then delivered to my application.

    However . . . I'm finding out that MVC seems to encourage the exact opposite (at least that's my perception). Now it seems to encourage data processing in the model on the application side, using LINQ.

    Am I understanding this correctly? Why is this the case? Why is it better to do it this way?

    I'm not trying to argue any point; rather, I'm looking for someone to educate me.

    +--------------------------------------------------------------------------------------+
    Check out my blog at https://pianorayk.wordpress.com/

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply