<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>ASP.NET Dynamic Data</title><link>http://forums.asp.net/1145.aspx</link><description>Discussions regarding the new scaffolding framework in ASP.NET</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: ASP.NET Dynamic Data + guid</title><link>http://forums.asp.net/thread/3473509.aspx</link><pubDate>Fri, 23 Oct 2009 10:33:55 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3473509</guid><dc:creator>bignbullish</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3473509.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1145&amp;PostID=3473509</wfw:commentRss><description>&lt;p&gt;A&amp;nbsp;better approach would be to use the Extensibility method .... &amp;quot;OnValidate&amp;quot;&amp;nbsp;&lt;/p&gt;&lt;pre class="c-sharp" name="code"&gt;    [MetadataTypeAttribute(typeof(Subject.SubjectMetadata))]
    public partial class Subject
    {
        partial void OnValidate(System.Data.Linq.ChangeAction action)
        {
            if (action == System.Data.Linq.ChangeAction.Insert)
            {
                this.Id = Guid.NewGuid();
            }
        }
        
        internal sealed class SubjectMetadata
        { ..... }
     }&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: ASP.NET Dynamic Data + guid</title><link>http://forums.asp.net/thread/3190763.aspx</link><pubDate>Wed, 27 May 2009 14:10:19 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3190763</guid><dc:creator>suicidesquad</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3190763.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1145&amp;PostID=3190763</wfw:commentRss><description>&lt;p&gt;&lt;strike&gt;SjNaughton pointed me at the following solution:&amp;nbsp;&lt;/strike&gt;&lt;pre class="coloredcode"&gt;&lt;strike&gt;*Solution*&lt;/strike&gt;&lt;/pre&gt;&lt;pre class="coloredcode"&gt;To get the GUID as primary key saved and invisible I just added this code for every entity:&lt;/pre&gt;&lt;pre class="coloredcode"&gt;&lt;span class="kwd"&gt;namespace&lt;/span&gt; DynamicDataEFProject&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [MetadataType(&lt;span class="kwd"&gt;typeof&lt;/span&gt;(ActionsMD))]&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; partial &lt;span class="kwd"&gt;class&lt;/span&gt; Actions&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; { &lt;font size="2"&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;p&gt;         act_ActionID = Guid&lt;/font&gt;&lt;font size="2"&gt;.NewGuid();&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; partial &lt;span class="kwd"&gt;class&lt;/span&gt; ActionsMD&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [ScaffoldColumn(&lt;span class="kwd"&gt;false&lt;/span&gt;)]&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwd"&gt;public object&lt;/span&gt; act_ActionID { &lt;span class="kwd"&gt;get&lt;/span&gt;; &lt;span class="kwd"&gt;set&lt;/span&gt;; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;/p&gt;&lt;p&gt;Now it generates the new Guid on insert and provides it to the database.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Do not add the setting &amp;quot;StoreGeneratedPattern=&amp;quot;Computed&amp;quot; or StoreGeneratedPattern=&amp;quot;Identity&amp;quot; in your model.xml in this scenario, because this entity parameter is an identity with type GUID.&lt;/p&gt;&lt;/pre&gt;</description></item><item><title>Re: ASP.NET Dynamic Data + guid</title><link>http://forums.asp.net/thread/3189940.aspx</link><pubDate>Wed, 27 May 2009 09:11:13 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3189940</guid><dc:creator>suicidesquad</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3189940.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1145&amp;PostID=3189940</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;To disable scaffolding of specific column I created the following class:&lt;/p&gt;
&lt;p&gt;&lt;span class="kwd"&gt;namespace&lt;/span&gt; DynamicDataEFProject&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [MetadataType(&lt;span class="kwd"&gt;typeof&lt;/span&gt;(ActionsMD))]&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; partial &lt;span class="kwd"&gt;class&lt;/span&gt; Actions&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; { &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; partial &lt;span class="kwd"&gt;class&lt;/span&gt; ActionsMD&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [ScaffoldColumn(&lt;span class="kwd"&gt;false&lt;/span&gt;)]&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwd"&gt;public object&lt;/span&gt; act_ActionID { &lt;span class="kwd"&gt;get&lt;/span&gt;; &lt;span class="kwd"&gt;set&lt;/span&gt;; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;The textfield is indeed not created anymore.&lt;/p&gt;
&lt;p&gt;But when I do an insert I get one of these 2 errors:&lt;/p&gt;
&lt;p&gt;When I add&amp;nbsp;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;StoreGeneratedPattern&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;=&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Computed&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&amp;quot; into the model.xml I get this error:&lt;/p&gt;&lt;/font&gt;
&lt;p&gt;&lt;i&gt;Modifications to tables where a primary key column has property &amp;#39;StoreGeneratedPattern&amp;#39; set to &amp;#39;Computed&amp;#39; are not supported. Use &amp;#39;Identity&amp;#39; pattern instead. Key column: &amp;#39;act_ActionID&amp;#39;. Table: &amp;#39;ZillionRIS_developModel.Store.Actions&amp;#39;.&lt;/i&gt; &lt;/p&gt;
&lt;p&gt;But when I add&amp;nbsp;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;StoreGeneratedPattern&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;=&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Identity&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&amp;quot; into the model.xml I get this error:&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;em&gt;Server-generated keys are only supported for identity columns. Key column &amp;#39;act_ActionID&amp;#39; has type &amp;#39;SqlServer.uniqueidentifier&amp;#39;, which is not a valid type for an identity column.&lt;/em&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;strong&gt;Am I still missing something?&lt;/strong&gt;&lt;/p&gt;&lt;/font&gt;</description></item><item><title>Re: ASP.NET Dynamic Data + guid</title><link>http://forums.asp.net/thread/3189457.aspx</link><pubDate>Wed, 27 May 2009 04:21:49 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3189457</guid><dc:creator>ricka6</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3189457.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1145&amp;PostID=3189457</wfw:commentRss><description>&lt;p&gt;I agree. I opened a bug some time ago. Note this only occurs in EF, not Linq to SQL. It will be fixed in the next RTM&amp;nbsp;release and probably in the next Beta.&lt;/p&gt;</description></item><item><title>Re: ASP.NET Dynamic Data + guid</title><link>http://forums.asp.net/thread/3187598.aspx</link><pubDate>Tue, 26 May 2009 09:51:54 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3187598</guid><dc:creator>suicidesquad</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3187598.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1145&amp;PostID=3187598</wfw:commentRss><description>&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Now I did the following for EF:&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;b id="1"&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/b&gt;&amp;lt;EntityType Name=&amp;quot;Actions&amp;quot;&amp;gt;&lt;br /&gt;&lt;b id="2"&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/b&gt;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;span class="tag"&gt;Key&lt;/span&gt;&amp;gt;&lt;br /&gt;&lt;b id="3"&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;span class="tag"&gt;PropertyRef&lt;/span&gt;&lt;span class="attr"&gt; Name=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;act_ActionID&amp;quot;&lt;/span&gt; /&amp;gt;&lt;br /&gt;&lt;b id="4"&gt;4&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/b&gt;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;span class="tag"&gt;Key&lt;/span&gt;&amp;gt;&lt;br /&gt;&lt;strong&gt;5&lt;/strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;lt;&lt;span class="tag"&gt;Property&lt;/span&gt;&lt;span class="attr"&gt; Name=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;act_ActionID&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; Type=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;uniqueidentifier&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; Nullable=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;false&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; &lt;strong&gt;&lt;u&gt;StoreGeneratedPattern=&lt;/u&gt;&lt;/strong&gt;&lt;/span&gt;&lt;span class="attrv"&gt;&lt;strong&gt;&lt;u&gt;&amp;quot;Identity&amp;quot;&lt;/u&gt;&lt;/strong&gt;&lt;/span&gt; /&amp;gt;&lt;br /&gt;&lt;b id="6"&gt;6&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/b&gt;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;span class="tag"&gt;Property&lt;/span&gt;&lt;span class="attr"&gt; Name=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;act_ActionName&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; Type=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;nvarchar&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; Nullable=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;false&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; MaxLength=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;50&amp;quot;&lt;/span&gt; /&amp;gt;&lt;br /&gt;&lt;b id="7"&gt;7&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/b&gt;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;span class="tag"&gt;Property&lt;/span&gt;&lt;span class="attr"&gt; Name=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;act_Description&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; Type=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;text&amp;quot;&lt;/span&gt; /&amp;gt;&lt;br /&gt;&lt;b id="8"&gt;8&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/b&gt;&amp;lt;/&lt;span class="tag"&gt;EntityType&lt;/span&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;You see I added the StoreGeneratedPattern=&amp;quot;Identity&amp;quot; at line 5, because it is an uniqueidentifier and only needs to be generated at creation.&lt;/p&gt;
&lt;p&gt;My assumption was that also the text file would be invisible, but I still get the warning that I have to fill in a value when I try to save the insert. Do I need to add something else?&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;</description></item><item><title>Re: ASP.NET Dynamic Data + guid</title><link>http://forums.asp.net/thread/3176413.aspx</link><pubDate>Wed, 20 May 2009 19:01:32 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3176413</guid><dc:creator>ricka6</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3176413.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1145&amp;PostID=3176413</wfw:commentRss><description>&lt;p&gt;The solution has alway been to update the XML and let the DB create the GUID.&lt;/p&gt;StoreGeneratedPattern=&amp;quot;Computed&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // EF&lt;br /&gt;IsDbGenerated=&amp;quot;true&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // L2S 
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: ASP.NET Dynamic Data + guid</title><link>http://forums.asp.net/thread/3175528.aspx</link><pubDate>Wed, 20 May 2009 12:48:34 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3175528</guid><dc:creator>suicidesquad</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3175528.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1145&amp;PostID=3175528</wfw:commentRss><description>&lt;p&gt;Is there a solution for handling the GUID in Preview 4?&lt;/p&gt;</description></item><item><title>Re: ASP.NET Dynamic Data + guid</title><link>http://forums.asp.net/thread/2550896.aspx</link><pubDate>Mon, 11 Aug 2008 19:45:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2550896</guid><dc:creator>Gidion</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2550896.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1145&amp;PostID=2550896</wfw:commentRss><description>&lt;p&gt;Hi, I have the same problem and came up with &lt;a href="http://alexduggleby.com/2008/08/11/dynamic-data-guidsuniqueidentifiers-as-primary-keys/"&gt;the following solution&lt;/a&gt;. It changes the dynamic data master template and implements a context menu where you can generate a GUID in the textbox for the primary key. It&amp;#39;s a rather lightweight solution (apart from downloading and using jQuery and 2 plugins) that you can implement in a couple of minutes. Maybe someone finds it useful.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: ASP.NET Dynamic Data + guid</title><link>http://forums.asp.net/thread/2523210.aspx</link><pubDate>Tue, 29 Jul 2008 20:50:03 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2523210</guid><dc:creator>zwitterion</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2523210.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1145&amp;PostID=2523210</wfw:commentRss><description>Too bad. Thanks for the reply though marcind.&lt;br /&gt;</description></item><item><title>Re: ASP.NET Dynamic Data + guid</title><link>http://forums.asp.net/thread/2522600.aspx</link><pubDate>Tue, 29 Jul 2008 16:29:31 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2522600</guid><dc:creator>marcind</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2522600.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1145&amp;PostID=2522600</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi zwitterion,&lt;/p&gt;&lt;p&gt;unfortunately there is no better way of doing this as the EF model does not provide Dynamic Data with enough information. A solution will not be available until v2.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: ASP.NET Dynamic Data + guid</title><link>http://forums.asp.net/thread/2522431.aspx</link><pubDate>Tue, 29 Jul 2008 15:25:55 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2522431</guid><dc:creator>aspnerd</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2522431.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1145&amp;PostID=2522431</wfw:commentRss><description>&lt;p&gt;I would guess there isn&amp;#39;t until a new version comes out. It took MS a couple weeks to get back with that solution at this point and I believe they have noted it for the new version.&lt;/p&gt;</description></item><item><title>Re: ASP.NET Dynamic Data + guid</title><link>http://forums.asp.net/thread/2522418.aspx</link><pubDate>Tue, 29 Jul 2008 15:21:44 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2522418</guid><dc:creator>zwitterion</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2522418.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1145&amp;PostID=2522418</wfw:commentRss><description>&lt;p&gt;I&amp;#39;ve been using aspnerd&amp;#39;s solution since all my entities have autogenerated (numberic identity) keys and I don&amp;#39;t want any of them in my forms. However it seems really wrong to have to break out a partial class every time we want to skip the scaffolding of an autogenerated key which should basically never be scaffolded anyway doesn&amp;#39;t it? Is there any better way of doing this?&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: ASP.NET Dynamic Data + guid</title><link>http://forums.asp.net/thread/2396001.aspx</link><pubDate>Mon, 02 Jun 2008 20:47:24 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2396001</guid><dc:creator>aspnerd</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2396001.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1145&amp;PostID=2396001</wfw:commentRss><description>&lt;p&gt;So here is the working solution for this issue.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Using the same namespace as your data model create a class.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Then create your partial class of the table you wish to use a SQL server set newid() guid.&lt;/p&gt;
&lt;p&gt;Here is a copy of the class I created.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;p&gt;using&lt;/font&gt;&lt;font size="2"&gt; System;&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;using&lt;/font&gt;&lt;font size="2"&gt; System.Collections.Generic;&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;using&lt;/font&gt;&lt;font size="2"&gt; System.Linq;&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;using&lt;/font&gt;&lt;font size="2"&gt; System.Web;&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;using&lt;/font&gt;&lt;font size="2"&gt; System.ComponentModel.DataAnnotations;&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;nbsp;&lt;/font&gt;&lt;/p&gt;&lt;font color="#0000ff" size="2"&gt;namespace&lt;/font&gt;&lt;font size="2"&gt; YourOwnDataModel&lt;br /&gt;{&lt;/font&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;MetadataType&lt;/font&gt;&lt;font size="2"&gt;(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;typeof&lt;/font&gt;&lt;font size="2"&gt;(&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;ClientInformation_MD&lt;/font&gt;&lt;font size="2"&gt;))]&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#000000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;partial&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;class&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;ClientInformation&lt;br /&gt;&lt;/font&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;nbsp;&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#000000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;public&lt;/font&gt;&lt;font size="2"&gt; ClientInformation()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ClientGUID = &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;Guid&lt;/font&gt;&lt;font size="2"&gt;.NewGuid();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#000000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;partial&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;class&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;ClientInformation_MD&lt;br /&gt;&lt;/font&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;Scaffold&lt;/font&gt;&lt;font size="2"&gt;(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;false&lt;/font&gt;&lt;font size="2"&gt;)]&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#000000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;public&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;object&lt;/font&gt;&lt;font size="2"&gt; ClientGUID { &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;get&lt;/font&gt;&lt;font size="2"&gt;; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;set&lt;/font&gt;&lt;font size="2"&gt;; }&lt;br /&gt;&lt;/font&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;&lt;/font&gt;</description></item><item><title>Re: ASP.NET Dynamic Data + guid</title><link>http://forums.asp.net/thread/2360416.aspx</link><pubDate>Thu, 15 May 2008 16:24:18 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2360416</guid><dc:creator>scothu</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2360416.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1145&amp;PostID=2360416</wfw:commentRss><description>&lt;p&gt;Entity Framework does not have the ability to tell Dynamic Data whether a column is generated, so by default we always assume it&amp;#39;s not.&amp;nbsp; To work around this, you can put a ScaffoldColumn(false) attribute on the property, e.g.&lt;/p&gt;
&lt;p&gt;[MetadataType(typeof(Products_MD))]&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/p&gt;
&lt;p&gt;partial class Products {&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/p&gt;
&lt;p&gt;partial class Products_MD {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; [ScaffoldColumn(false)]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; public object ProductID { get; set; }&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/p&gt;
&lt;p&gt;}&lt;br /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: ASP.NET Dynamic Data + guid</title><link>http://forums.asp.net/thread/2359977.aspx</link><pubDate>Thu, 15 May 2008 13:30:38 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2359977</guid><dc:creator>aspnerd</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2359977.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1145&amp;PostID=2359977</wfw:commentRss><description>&lt;p&gt;were you ever able to get this fixed? I&amp;#39;m having the same issue with Entity Data Model, but I don&amp;#39;t see the options they are referring to.&lt;/p&gt;</description></item></channel></rss>