locked
Newbie questions about incorporating Dynamic Data into an existing website RRS feed

  • Question

  • User1694517121 posted

    Sorry if this is old stuff but I could find topics that covered these issues already.  

    I am developing part of a corporate web site at present using VS 2010 in C#.  There are a lot of tables in a SQL Server database that are essentially configuration tables.  In short, they are used very infrequently and hence are good candidates I think to scaffold with DD.  They tend to be relatively simple tables with only a few fields each.  My questions are:

    1 - Many of these tables have a created by and created date and modified by and modified date fields (not really an audit trail, just the last modification and the creation of the record is tracked.  For these fields, I need them to be read only and I plan to write code in the before save of the object context that will retrieve the current user ID to plug into the created by and the modified by fields.  If I write my part of the project as a web application, will I be able to retrieve the info from the session of the user in the web site in general?  Does a web app have access to the session of the website as a whole?

    2 - If not and I write the DD of these tables as a web site, what are the ins and outs of the routing.  I can't have the routing for these tables applying to other tables used elsewhere in the web site but because the routing is stored in the global.asax file and the model is the DefaultModel it looks like there are plenty of opportunities for mischief afoot if there is than one model in the web site as a whole.  

    If anyone knows a way to make the default model.registercontext and the routes specific to the folder either the web application or the web pages for this functionalaity resides in that looks like it would solve my problem but frankly I'm so new to DD that maybe I'm inventing problems where there aren't any --- like if I could apply the scaffolding and routing per table and not specify it in the global.asax that would probably solve the problem.

    Any help would be appreciated and if you know of good resources (books, etc.) that address these questions I'd appreciate hearing about them.  I have ASP.NET Dynamic Data Unleashed but it sort of jumps off the deep end (at least it looks that way to me) and doesn't quite address questions like this in a way that I can comprehend yet.

    thanks in advance 

    Wednesday, July 11, 2012 3:57 PM

Answers

All replies