Multiple Tables in the same MVC app / View

Last post 11-03-2009 1:42 PM by Pikesville Paesano. 2 replies.

Sort Posts:

  • Multiple Tables in the same MVC app / View

    11-03-2009, 12:17 PM
    • Member
      14 point Member
    • brandrui
    • Member since 08-07-2009, 4:14 PM
    • Independence, MO
    • Posts 5

    I'm working on a web application to update a tutoring database and thought MVC would make a good framework. I've done a lot of the basic coding off of one table in the database. However, the application actually needs to pull data from multiple tables in different places and then write all of the entered data into the one table which is currently being referenced.

    e.g. The table referenced by create and edit is called Encounter. It has one to many links to a Student table, a Teacher table, a School table and a Subject table. The hope is to use Ajax to call to a field in the Student table to start giving options when the name starts to be entered as well as populate a drop down list from the School table. Also looking to include a nice date and time picker for the start and finish times which can then calculate elapsed time in minutes and hours in separate fields. (Don't ask on that one, user requested.)

    However to get this all started, I need to know if it's possible to access multiple tables and if there are any resources to help me catch up on how to do this so I can read and then trial and error code it myself.

    Any direction to resources I'm missing will be helpful,


    Thanks,

    Tony


  • Re: Multiple Tables in the same MVC app / View

    11-03-2009, 1:27 PM
    • Contributor
      6,859 point Contributor
    • gerrylowry
    • Member since 07-03-2008, 1:46 AM
    • alliston ontario canada
    • Posts 2,310

    The NerdDinner application demonstrates how to build an ASP.NET MVC project starting with File -> New Project, and then incrementally adding new functionality and features. It uses ASP.NET MVC along with jQuery, ASP.NET Ajax, Virtual Earth Javascript controls, and LINQ to SQL. It’s also a real site running at NerdDinner.com that you can use to schedule geek meet-ups and nerd dinners in your neighborhood.

                http://aspnetmvcbook.s3.amazonaws.com/aspnetmvc-nerdinner_v1.pdf


    http://nerddinnerbook.s3.amazonaws.com/Part2.htm
    http://nerddinnerbook.s3.amazonaws.com/Part3.htm
    http://nerddinnerbook.s3.amazonaws.com/Part4.htm

     

    I think it will benefit you to work through the above
    and/or other tutorials at http://www.asp.net/mvc/learn
            Learn ASP.NET MVC



    Regards,
    Gerry (Lowry)

    Gerry Lowry, Principal
    Ability Business Computer Services ~~ Because it's your Business, our Experience Counts!
    68 John W. Taylor Avenue
    Alliston · Ontario · Canada · L9R 0E1 · gerry.lowry@abilitybusinesscomputerservices.com

    Websites:
    http://abilitybusinesscomputerservices.com
    http://gerrylowryprogrammer.com ~~ résumé & testimonials
    http://veganoccasions.com ~~ recipes by Susan
  • Re: Multiple Tables in the same MVC app / View

    11-03-2009, 1:42 PM
    Answer

    I've been working on an application within the school domain. I can probably help you since I've already got a lot of something similar already being built. (my app's already got district, school, faculty tables, etc. ) send me a private message if you'd like to swap some code.

    Remember to mark as a answer if it helps, and to help someone else in kind...

    You haven't had a beer until you've learned how to make your own...
Page 1 of 1 (3 items)