none
generated navigation item names RRS feed

  • Question

  •  

    Generated Navigation item names

     

    Please forgive me if this is a naïve question, but I have two concerns about what the model presents to the user.

    I am using a basic DynamicData site(no custom templates) pulling from an unmodified LINQ to SQL class model.

    My Database is relatively simple.   Although I use foreign keys, I have no views, procs, etc..

    Example1:
    Table: Numbers, column: Number

    Table: Seasons, columns: Player01Num, Player02Num, Player03Num, etc….

    ( all PlayerXXNum columns reference the Number column of Table:Numbers)

    What is presented to the user, by default, by the model, is a dropdown/column(depending on whether on insert/edit/view) for each PlayerXXNum column using the table name of the referenced column(with an incremented number appended to it when there are multiple, such as in this example).   The user sees “Numbers”, “Numbers1”, “Numbers2”, etc..  instead of “PlayerXXNum”.    They might make a selection for what they see as “Numbers3”, and actually be setting the value for what is going to be going into the “Player14Num” column of the record they are inserting/editing.    The bottom line, they have no idea which columns are being presented to them, unless I do one of two things.   Either modify the names in the model, which will have to be re-done if the model ever needs to be regenerated, or hard code the appropriate names on the aspx pages.

    Example 2:

    Table: People, columns PersID (identity, integer, & primary key), Mother, Father, name, etc…
    The Mother and Father columns allow nulls, but reference the PersID column(in the same table)

    Resulting behavior in default, unmodified DynamicData site to user:
    Same column/dropdown name symptom as described in Example 1(“People1” and “People2”), but with an additional symptom…
    There are two additional columns presented to user when ‘viewing’ the table: “People3” & “People4”.    This appears to users as if there are two more columns in the table than there actually are.   When a new record is being inserted, the user is only provided dropdowns for “People1”(Mother column) and “People2”(Father column), but when returned to table view, the extra columns are displayed, without values, of course.

     

    I am, of course, seeking to understand before making any declarative statements.
    My only intent, outside of asking for assistance with understanding the purpose for this behavior, is to convey my ‘user experience’ of this new technology.    Coming from having been able to drag a table straight from a db in server explorer, within VisualWebDev to an aspx page and have a gridview display the table accurately, I would hope that there would be a way to set a preference somehow that would affect the way the models are generated so that the column headers would, by default, be the actual column’s name, and that the name next to a drop down in edit/insert mode would do the same.

    Any insight/explanation would be greatly appreciated!

     

    Thank you,
    Gary

    Friday, July 25, 2008 2:30 PM

Answers

  • Am I right in thinking your query is just about how Dynamic Data is representing data from your data context on the web page or do you have some concerns about how the data context itself is named and generated?

    If it is just dynamic data/web page then reposting it on the ASP.NET Dynamic Data forums would likely yield a more satisfactory answer Smile

    [)amien
    Tuesday, July 29, 2008 9:07 PM
    Moderator

All replies

  • Am I right in thinking your query is just about how Dynamic Data is representing data from your data context on the web page or do you have some concerns about how the data context itself is named and generated?

    If it is just dynamic data/web page then reposting it on the ASP.NET Dynamic Data forums would likely yield a more satisfactory answer Smile

    [)amien
    Tuesday, July 29, 2008 9:07 PM
    Moderator
  • I have the same question as gstadter regarding the naming of navigation properties.

    However, my question is directed to how the data context itselft is named and generated (not about Dynamic Data).

    When manipulated objects, it can be hard to tell which navigation property is related to which foreign key due to the renaming of properties.

    Any help would be greatly appreciated!

     

     

    Friday, September 5, 2008 8:17 PM