locked
Newbie question RRS feed

  • Question

  • User1522642195 posted
    Hi all, Iv just taken this fresh out of the box and noticed something that i cant find documentation on. In DDS's when I click insert, it asks for the primary key, -How can I ensure that the Primary key is auto generated by the DB and remove this UI option from the user? Any resources would be greatly appreciated :) #L
    Tuesday, November 11, 2008 6:18 AM

Answers

  • User-330204900 posted

    First of all welcome [:D] to the wonderful world of DD

    If you are using Linq to SQL that is the Dynamic Data Website or Dynamic Data Web Application Project the Entity Framwork stuff has Entity Framewrok in the name [:D], then its easy you just select the column in the Designe view, and in the Column Properties expand Identity Specification and set the (Is Identity) to Yes and your done.

    From Blogger Pictures

     

    the Entity Framwork is the same in SQL but the column will show in the Details, Edit, Insert and List pages you will have to use metadata to hide the column with [ScaffoldColumn(false)]

    Hope this helps [:D]

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, November 11, 2008 8:06 AM

All replies

  • User-330204900 posted

    First of all welcome [:D] to the wonderful world of DD

    If you are using Linq to SQL that is the Dynamic Data Website or Dynamic Data Web Application Project the Entity Framwork stuff has Entity Framewrok in the name [:D], then its easy you just select the column in the Designe view, and in the Column Properties expand Identity Specification and set the (Is Identity) to Yes and your done.

    From Blogger Pictures

     

    the Entity Framwork is the same in SQL but the column will show in the Details, Edit, Insert and List pages you will have to use metadata to hide the column with [ScaffoldColumn(false)]

    Hope this helps [:D]

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, November 11, 2008 8:06 AM
  • User1522642195 posted
    many thanks :)
    Tuesday, November 11, 2008 8:12 AM