locked
Upgrading application to MVC RRS feed

  • Question

  • Hi,

    I am upgrading asp.net legacy application to follow proper MVC pattern. Currently the application is all fucked up in organization design and in terms of re-usability. I am in the process to figure out all the components like Business Layer, Business Objects & Data Layer.

    I have doubts in Data Layer implementation.

    Data Layer Issues:

    1. I have lot of select queries in legacy app getting data from data base. Those are currently written as plain select queries in the application itself.

    2. I have almost all the insert and update statement written as plain sql queries in code behind.

    3. There is no logic implemented to reuse these operations for other purposes, which I am implementing now.

    Doubt:

    I am thinking about the right way to implement the select queries, they are hell lot of it. As per MVC design, what should be the correct way to implement these?

    Should they be as functions with plain queries in application data layer or each of it should be as database functions?

    I have converted all the insert/update operation into stored procedures and will be called from application. But I am in doubt about the get operations?

     

    Please Suggest,

    Anshuman

    • Moved by Andreas Johansson Wednesday, September 21, 2011 2:37 PM ASP.NET (From:.NET Base Class Library)
    Wednesday, September 21, 2011 7:10 AM

Answers

  • I am sorry but this forum doesn't cover asp.net/mvc discussion. For better help please use the forums over at http://forums.asp.net/

     

    • Proposed as answer by Just Karl Tuesday, January 14, 2014 11:37 PM
    • Marked as answer by Just Karl Tuesday, January 14, 2014 11:37 PM
    Wednesday, September 21, 2011 2:36 PM

All replies

  • Hi,

    Did you switched to MVC on this reason? 

    Any how, What i would suggest look for will you be able to use ORM in your scenario...this makes your life easy...especially with EF4.1 

    http://msdn.microsoft.com/en-us/library/gg696172(v=VS.103).aspx


    If this post answers your question, please click "Mark As Answer". If this post is helpful please click "Mark as Helpful".
    Wednesday, September 21, 2011 7:41 AM
  • I am sorry but this forum doesn't cover asp.net/mvc discussion. For better help please use the forums over at http://forums.asp.net/

     

    • Proposed as answer by Just Karl Tuesday, January 14, 2014 11:37 PM
    • Marked as answer by Just Karl Tuesday, January 14, 2014 11:37 PM
    Wednesday, September 21, 2011 2:36 PM
  • Hello,

    Specifically, this should be asked in the ASP.Net MVC forum on forums.asp.net.

    Karl

    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
    My Blog: Unlock PowerShell
    My Book: Windows PowerShell 2.0 Bible
    My E-mail: -join ('6F6C646B61726C40686F746D61696C2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})

    • Proposed as answer by Just Karl Wednesday, January 22, 2014 4:49 AM
    Tuesday, January 14, 2014 11:37 PM