<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : Code First Migration</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Code First Migration</description>
  <pubDate>Wed, 13 May 2026 01:03:19 -700</pubDate>
  <lastBuildDate>Wed, 12 Sep 2012 20:13:26 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=3611</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>Code First Migration : Hi Silvio,Disregard my last reply,...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3611&amp;PID=14422#14422</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1228" rel="nofollow">Vonzkie</a><br /><strong>Subject:</strong> 3611<br /><strong>Posted:</strong> 12-Sep-2012 at 8:13pm<br /><br />Hi Silvio,<div><br>Disregard my last reply, I already fixed the issue.</div><div>But with the orignial post, just update me when you're done.</div><div><br></div><div>Thanks,</div><div>Von</div>]]>
   </description>
   <pubDate>Wed, 12 Sep 2012 20:13:26 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3611&amp;PID=14422#14422</guid>
  </item> 
  <item>
   <title>Code First Migration : Hi Silvio,What I mean to say is...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3611&amp;PID=14421#14421</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1228" rel="nofollow">Vonzkie</a><br /><strong>Subject:</strong> 3611<br /><strong>Posted:</strong> 12-Sep-2012 at 6:57pm<br /><br />Hi Silvio,<div><br></div><div>What I mean to say is the Model I'm compiling now with those errors is not the same as the one i send or the one you send, this are separate set of tables, basically another model.</div><div><br></div><div>Thanks,</div><div>Von</div>]]>
   </description>
   <pubDate>Wed, 12 Sep 2012 18:57:49 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3611&amp;PID=14421#14421</guid>
  </item> 
  <item>
   <title>Code First Migration :  Von,While I was able to compile...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3611&amp;PID=14414#14414</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=892" rel="nofollow">sbelini</a><br /><strong>Subject:</strong> 3611<br /><strong>Posted:</strong> 12-Sep-2012 at 9:03am<br /><br />Von,<div></div>While I was able to compile and enable Migrations in the sample I sent you, it's just for your reference.<div></div>I moved the Entity classes around to keep them organized.<div></div>Basically the change is that I removed the ForeignKey tags and added a few necessage navigation using fluent API.<div></div>Also, be sure to update the connectionString.<div></div>Silvio.]]>
   </description>
   <pubDate>Wed, 12 Sep 2012 09:03:17 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3611&amp;PID=14414#14414</guid>
  </item> 
  <item>
   <title>Code First Migration : Hi,Ok thanks..Just keep me posted...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3611&amp;PID=14409#14409</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1228" rel="nofollow">Vonzkie</a><br /><strong>Subject:</strong> 3611<br /><strong>Posted:</strong> 12-Sep-2012 at 4:20am<br /><br />Hi,<div><br></div><div>Ok thanks..</div><div>Just keep me posted on how it goes.</div><div>Btw, did you already encountered some errors like the following:</div><div><br></div><div>1st Error:</div><div><br></div><div><div>Error<span ="Apple-tab-span" style="white-space:pre">	</span>7<span ="Apple-tab-span" style="white-space:pre">	</span>An error occurred during metadata generation and a metadata file could not be created. &nbsp;Error: Unable to find the requested .Net Framework Data Provider. &nbsp;It may not be installed.<span ="Apple-tab-span" style="white-space:pre">	</span>iRely.TankManagement.Model</div></div><div><br></div><div>2nd Error:</div><div><br></div><div><div>Error<span ="Apple-tab-span" style="white-space:pre">	</span>7<span ="Apple-tab-span" style="white-space:pre">	</span>An error occurred during metadata generation and a metadata file could not be created. &nbsp;Error: Sequence contains more than one element<span ="Apple-tab-span" style="white-space:pre">	</span>iRely.TankManagement.Model</div></div><div><br></div><div>This happens when I compile the model (This is not the same model as the first one I send)</div><div><br></div><div><br></div><div><br></div>]]>
   </description>
   <pubDate>Wed, 12 Sep 2012 04:20:33 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3611&amp;PID=14409#14409</guid>
  </item> 
  <item>
   <title>Code First Migration :    Hi Von,I isolated the issue...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3611&amp;PID=14399#14399</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=892" rel="nofollow">sbelini</a><br /><strong>Subject:</strong> 3611<br /><strong>Posted:</strong> 11-Sep-2012 at 1:53pm<br /><br />Hi Von,<div>&nbsp;</div><div>I isolated the issue to the &#091;ForeignKey&#093;.</div><div>I'm still working on determining if this is an EF or DevForce issue.</div><div>In the meantime, in order to get you going, you should remove all &#091;ForeignKey&#093; tags from your code. </div><div>Note that for your code in particular most of them are redundant because the PK~FK is following naming convention, but you still have a few relations you should either change the property names to follow convention or use fluent API.</div><div>&nbsp;</div><div>I'm attaching your sample with the changes I made, so you can get a headstart: <a href="uploads/892/iRely.Model.zip" target="_blank">uploads/892/iRely.Model.zip</a></div><div>&nbsp;</div><div>Regards,</div><div>&nbsp;&nbsp; Silvio.</div>]]>
   </description>
   <pubDate>Tue, 11 Sep 2012 13:53:10 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3611&amp;PID=14399#14399</guid>
  </item> 
  <item>
   <title>Code First Migration :   Hi Von,I&amp;#039;m still investigating...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3611&amp;PID=14398#14398</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=892" rel="nofollow">sbelini</a><br /><strong>Subject:</strong> 3611<br /><strong>Posted:</strong> 11-Sep-2012 at 9:14am<br /><br />Hi Von,<div>&nbsp;</div><div>I'm still investigating and will keep you posted.</div><div>&nbsp;</div><div>Silvio.</div>]]>
   </description>
   <pubDate>Tue, 11 Sep 2012 09:14:48 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3611&amp;PID=14398#14398</guid>
  </item> 
  <item>
   <title>Code First Migration : Hi Guys,Just want to follow up...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3611&amp;PID=14392#14392</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1228" rel="nofollow">Vonzkie</a><br /><strong>Subject:</strong> 3611<br /><strong>Posted:</strong> 10-Sep-2012 at 6:36pm<br /><br />Hi Guys,<div><br></div><div>Just want to follow up this..&nbsp;</div><div><br></div><div>Thanks,</div><div>Von</div>]]>
   </description>
   <pubDate>Mon, 10 Sep 2012 18:36:42 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3611&amp;PID=14392#14392</guid>
  </item> 
  <item>
   <title>Code First Migration :  This is the link of my proje...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3611&amp;PID=14367#14367</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1228" rel="nofollow">Vonzkie</a><br /><strong>Subject:</strong> 3611<br /><strong>Posted:</strong> 06-Sep-2012 at 6:26pm<br /><br />This is the link of my project:<div><a href="uploads/1228/iRely.Model.rar" target="_blank">uploads/1228/iRely.Model.rar</a><br></div><div><br></div><div>The Database Backup is inside the folder Backup</div><span style="font-size:10px"><br /><br />Edited by Vonzkie - 06-Sep-2012 at 6:26pm</span>]]>
   </description>
   <pubDate>Thu, 06 Sep 2012 18:26:07 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3611&amp;PID=14367#14367</guid>
  </item> 
  <item>
   <title>Code First Migration : Hi,Actually, that&amp;#039;s what...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3611&amp;PID=14365#14365</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1228" rel="nofollow">Vonzkie</a><br /><strong>Subject:</strong> 3611<br /><strong>Posted:</strong> 06-Sep-2012 at 5:26pm<br /><br />Hi,<div><br></div><div>Actually, that's what I did, I select the Project where the DBContext resides.</div><div><br></div><div>Btw., the error shown above happened when I used 4.3.1 version of EF4.</div><div>Now, I use 4.3.0 and the error didn't show but this is the new error:</div><div><br></div><div><div>PM&gt; Enable-Migrations -Force</div><div>System.NullReferenceException: Object reference not set to an instance of an object.</div><div>&nbsp; &nbsp;at System.Data.Entity.ModelConfiguration.Configuration.Types.EntityTypeConfiguration.Configure(EdmEntityType entityType, EdmModel model)</div><div>&nbsp; &nbsp;at System.Data.Entity.ModelConfiguration.Configuration.ModelConfiguration.ConfigureEntities(EdmModel model)</div><div>&nbsp; &nbsp;at System.Data.Entity.DbModelBuilder.Build(DbProviderManifest providerManifest, DbProviderInfo providerInfo)</div><div>&nbsp; &nbsp;at System.Data.Entity.DbModelBuilder.Build(DbConnection providerConnection)</div><div>&nbsp; &nbsp;at System.Data.Entity.Infrastructure.EdmxWriter.WriteEdmx(DbContext context, XmlWriter writer)</div><div>&nbsp; &nbsp;at System.Data.Entity.Migrations.Extensions.DbContextExtensions.&lt;&gt;c__DisplayClass1.&lt;GetModel&gt;b__0(XmlWriter w)</div><div>&nbsp; &nbsp;at System.Data.Entity.Migrations.Extensions.DbContextExtensions.GetModel(Action`1 writeXml)</div><div>&nbsp; &nbsp;at System.Data.Entity.Migrations.Extensions.DbContextExtensions.GetModel(DbContext context)</div><div>&nbsp; &nbsp;at System.Data.Entity.Migrations.DbMigrator..ctor(DbMigrationsConfiguration configuration, DbContext usersContext)</div><div>&nbsp; &nbsp;at System.Data.Entity.Migrations.DbMigrator..ctor(DbMigrationsConfiguration configuration)</div><div>&nbsp; &nbsp;at System.Data.Entity.Migrations.Design.MigrationScaffolder..ctor(DbMigrationsConfiguration migrationsConfiguration)</div><div>&nbsp; &nbsp;at System.Data.Entity.Migrations.Design.ToolingFacade.ScaffoldRunner.RunCore()</div><div>&nbsp; &nbsp;at System.Data.Entity.Migrations.Design.ToolingFacade.BaseRunner.Run()</div><div>Object reference not set to an instance of an object.</div></div><div><br></div><div><div>PM&gt; Add-Migration Sample -StartupProjectName "iRely.Model"</div><div>System.NullReferenceException: Object reference not set to an instance of an object.</div><div>&nbsp; &nbsp;at System.Data.Entity.ModelConfiguration.Configuration.Types.EntityTypeConfiguration.Configure(EdmEntityType entityType, EdmModel model)</div><div>&nbsp; &nbsp;at System.Data.Entity.ModelConfiguration.Configuration.ModelConfiguration.ConfigureEntities(EdmModel model)</div><div>&nbsp; &nbsp;at System.Data.Entity.DbModelBuilder.Build(DbProviderManifest providerManifest, DbProviderInfo providerInfo)</div><div>&nbsp; &nbsp;at System.Data.Entity.DbModelBuilder.Build(DbConnection providerConnection)</div><div>&nbsp; &nbsp;at System.Data.Entity.Infrastructure.EdmxWriter.WriteEdmx(DbContext context, XmlWriter writer)</div><div>&nbsp; &nbsp;at System.Data.Entity.Migrations.Extensions.DbContextExtensions.&lt;&gt;c__DisplayClass1.&lt;GetModel&gt;b__0(XmlWriter w)</div><div>&nbsp; &nbsp;at System.Data.Entity.Migrations.Extensions.DbContextExtensions.GetModel(Action`1 writeXml)</div><div>&nbsp; &nbsp;at System.Data.Entity.Migrations.Extensions.DbContextExtensions.GetModel(DbContext context)</div><div>&nbsp; &nbsp;at System.Data.Entity.Migrations.DbMigrator..ctor(DbMigrationsConfiguration configuration, DbContext usersContext)</div><div>&nbsp; &nbsp;at System.Data.Entity.Migrations.DbMigrator..ctor(DbMigrationsConfiguration configuration)</div><div>&nbsp; &nbsp;at System.Data.Entity.Migrations.Design.ToolingFacade.BaseRunner.GetMigrator()</div><div>&nbsp; &nbsp;at System.Data.Entity.Migrations.Design.ToolingFacade.GetPendingMigrationsRunner.RunCore()</div><div>&nbsp; &nbsp;at System.Data.Entity.Migrations.Design.ToolingFacade.BaseRunner.Run()</div><div>Object reference not set to an instance of an object.</div></div><div><br></div><div><br></div><div><br></div><div><br></div>]]>
   </description>
   <pubDate>Thu, 06 Sep 2012 17:26:22 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3611&amp;PID=14365#14365</guid>
  </item> 
  <item>
   <title>Code First Migration : Hi,In the console, you might need...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3611&amp;PID=14358#14358</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=998" rel="nofollow">Walid</a><br /><strong>Subject:</strong> 3611<br /><strong>Posted:</strong> 06-Sep-2012 at 3:27am<br /><br />Hi,<div><br></div><div>In the console, you might need to specify in the Default Project combo the Assembly where you DBContext is located.</div>]]>
   </description>
   <pubDate>Thu, 06 Sep 2012 03:27:49 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3611&amp;PID=14358#14358</guid>
  </item> 
  <item>
   <title>Code First Migration : Btw., I have an existing database...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3611&amp;PID=14356#14356</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1228" rel="nofollow">Vonzkie</a><br /><strong>Subject:</strong> 3611<br /><strong>Posted:</strong> 06-Sep-2012 at 1:12am<br /><br />Btw., I have an existing database here, I do not create my Database using code first.<div><br></div><div>Here are my errors:</div><div><br></div><div><div>PM&gt; Enable-Migrations -Force</div><div>No classes deriving from DbContext found in the current project.</div><div>Edit the generated Configuration class to specify the context to enable migrations for.</div><div>No migrations configuration type was found in the assembly 'MyDomain'. (In Visual Studio you can use the Enable-Migrations command from Package Manager Console to add a migrations configuration).</div></div><div><br></div><div><br></div><div><div>PM&gt; Add-Migration Sample -StartupProjectName "MyDomain"</div><div>No migrations configuration type was found in the assembly 'MyDomain'. (In Visual Studio you can use the Enable-Migrations command from Package Manager Console to add a migrations configuration).</div></div><div><br></div><div>Note: I have a custom DBContext in my project</div>]]>
   </description>
   <pubDate>Thu, 06 Sep 2012 01:12:17 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3611&amp;PID=14356#14356</guid>
  </item> 
  <item>
   <title>Code First Migration : Hi,Do you have a working example...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3611&amp;PID=14355#14355</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1228" rel="nofollow">Vonzkie</a><br /><strong>Subject:</strong> 3611<br /><strong>Posted:</strong> 06-Sep-2012 at 12:20am<br /><br />Hi,<div><br></div><div>Do you have a working example of a Devforce Code First project that uses the Migration Feature of Entity Framework 4.3?</div><div>Cause I'm having hard time trying to do what is instructed on this article:</div><div><a href="http://blogs.msdn.com/b/ad&#111;net/archive/2012/02/09/ef-4-3-code-based-migrati&#111;ns-walkthrough.aspx" target="_blank">http://blogs.msdn.com/b/adonet/archive/2012/02/09/ef-4-3-code-based-migrations-walkthrough.aspx</a></div><div><br></div><div>I have some errors while executing NuGet commands and I don't know if this is not compatible with Devforce.</div><div><br></div><div>Thanks,</div><div>Von</div>]]>
   </description>
   <pubDate>Thu, 06 Sep 2012 00:20:57 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3611&amp;PID=14355#14355</guid>
  </item> 
 </channel>
</rss>