<?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 : EntityManagerSaveException: No CodeFirst entities were found</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : EntityManagerSaveException: No CodeFirst entities were found</description>
  <pubDate>Wed, 13 May 2026 13:59:45 -700</pubDate>
  <lastBuildDate>Tue, 15 Nov 2011 09:25:23 -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=2967</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>EntityManagerSaveException: No CodeFirst entities were found :   In a unit test, be sure the...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2967&amp;PID=12066#12066</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=11" rel="nofollow">kimj</a><br /><strong>Subject:</strong> 2967<br /><strong>Posted:</strong> 15-Nov-2011 at 9:25am<br /><br />In a unit test, be sure the app.config is deployed.&nbsp; The debug log will tell you if it found the config or is using a "fall back".]]>
   </description>
   <pubDate>Tue, 15 Nov 2011 09:25:23 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2967&amp;PID=12066#12066</guid>
  </item> 
  <item>
   <title>EntityManagerSaveException: No CodeFirst entities were found : Thanks KimIn case I didn&amp;#039;t...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2967&amp;PID=12060#12060</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=963" rel="nofollow">Louis</a><br /><strong>Subject:</strong> 2967<br /><strong>Posted:</strong> 14-Nov-2011 at 11:51pm<br /><br />Thanks Kim<div><br></div><div>In case I didn't mention it explicitly before, I was getting this error through a unit test.&nbsp;</div><div>&nbsp;</div><div>After I created a small console test app (with the proper connection set in the app.config) and called the same method .. the query finally works.</div><div><br></div><div>I will refactor the unit test to set the connection there.</div><div><br></div><div>Thanks</div><div><br></div><div><br></div>]]>
   </description>
   <pubDate>Mon, 14 Nov 2011 23:51:19 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2967&amp;PID=12060#12060</guid>
  </item> 
  <item>
   <title>EntityManagerSaveException: No CodeFirst entities were found :   Hi Louis,There&amp;#039;s nothing...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2967&amp;PID=12059#12059</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=11" rel="nofollow">kimj</a><br /><strong>Subject:</strong> 2967<br /><strong>Posted:</strong> 14-Nov-2011 at 5:56pm<br /><br />Hi Louis,<div>&nbsp;</div><div>There's nothing you need to add, but for some reason DevForce thinks your model is a Code First one, and is following that path.&nbsp; Can you double check that the connection string or edmKey "EnvisionShellEntities" is in your server's config file, and that the contents of the string contain the usual "metadata=..."?</div>]]>
   </description>
   <pubDate>Mon, 14 Nov 2011 17:56:51 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2967&amp;PID=12059#12059</guid>
  </item> 
  <item>
   <title>EntityManagerSaveException: No CodeFirst entities were found : Hello, I am receiving the same...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2967&amp;PID=12054#12054</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=963" rel="nofollow">Louis</a><br /><strong>Subject:</strong> 2967<br /><strong>Posted:</strong> 14-Nov-2011 at 2:10pm<br /><br />Hello, I am receiving the same error message.<DIV></DIV>My connection string is properly set.&nbsp;&nbsp; I had generated the model from an existing database so I was surprised to see a need for CodeFirst. Here is my stack trace.&nbsp; I&nbsp;see it coming from CreateDbContext().&nbsp; Is there possibly something I need to add to my model?&nbsp;<DIV>&nbsp;</DIV><DIV><P style="MARGIN: 0in; FONT-FAMILY: 'Comic Sans MS'; COLOR: blue; FONT-SIZE: 9.5pt">IdeaBlade.EntityModel.EntityServerException: Key 'EnvisionShellEntities': Error in DbKey EnvisionShellEntities:<SPAN style="mso-spacerun: yes">&nbsp; </SPAN></P><P style="MARGIN: 0in; FONT-FAMILY: 'Comic Sans MS'; COLOR: blue; FONT-SIZE: 9.5pt">No CodeFirst entities were found in assembly Decade.CIW.Connectors.Envision4.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null ---&gt; </P><P style="MARGIN: 0in; FONT-FAMILY: 'Comic Sans MS'; COLOR: blue; FONT-SIZE: 9.5pt">System.ArgumentException: Error in DbKey EnvisionShellEntities:<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>No CodeFirst entities were found in assembly Decade.CIW.Connectors.Envision4.Model, </P><P style="MARGIN: 0in; FONT-FAMILY: 'Comic Sans MS'; COLOR: blue; FONT-SIZE: 9.5pt">Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</P><P style="MARGIN: 0in; FONT-FAMILY: 'Comic Sans MS'; COLOR: blue; FONT-SIZE: 9.5pt">&nbsp;</P><P style="MARGIN: 0in; FONT-FAMILY: 'Comic Sans MS'; COLOR: blue; FONT-SIZE: 9.5pt">IdeaBlade.EntityModel.Edm.DbKey.get_Builder()</P><P style="MARGIN: 0in; FONT-FAMILY: 'Comic Sans MS'; COLOR: blue; FONT-SIZE: 9.5pt">IdeaBlade.EntityModel.Edm.DbKey.CreateDbContext()</P><P style="MARGIN: 0in; FONT-FAMILY: 'Comic Sans MS'; COLOR: blue; FONT-SIZE: 9.5pt">IdeaBlade.EntityModel.Edm.DbKey.CreateContext()</P><P style="MARGIN: 0in; FONT-FAMILY: 'Comic Sans MS'; COLOR: blue; FONT-SIZE: 9.5pt">IdeaBlade.EntityModel.EntityManager.HandleEntityServerException(Exception ex, Boolean tryToHandle, PersistenceOperation operation, Boolean throwOnError)</P><P style="MARGIN: 0in; FONT-FAMILY: 'Comic Sans MS'; COLOR: blue; FONT-SIZE: 9.5pt">IdeaBlade.EntityModel.EntityManager.ExecuteServerQuery(IEntityQuerySurrogate entityQuery)</P><P style="MARGIN: 0in; FONT-FAMILY: 'Comic Sans MS'; COLOR: blue; FONT-SIZE: 9.5pt">IdeaBlade.EntityModel.EntityManager.ExecuteFetch(IEntityFinder finder)</P><P style="MARGIN: 0in; FONT-FAMILY: 'Comic Sans MS'; COLOR: blue; FONT-SIZE: 9.5pt">IdeaBlade.EntityModel.EntityKeyFinder.ExecuteFindThenFetch()</P><P style="MARGIN: 0in; FONT-FAMILY: 'Comic Sans MS'; COLOR: blue; FONT-SIZE: 9.5pt">IdeaBlade.EntityModel.EntityKeyFinder.Execute()</P><P style="MARGIN: 0in; FONT-FAMILY: 'Comic Sans MS'; COLOR: blue; FONT-SIZE: 9.5pt">IdeaBlade.EntityModel.EntityManager.ExecuteQueryCore(IEntityQuery query, Boolean isAsync)</P><P style="MARGIN: 0in; FONT-FAMILY: 'Comic Sans MS'; COLOR: blue; FONT-SIZE: 9.5pt">IdeaBlade.EntityModel.EntityManager.ExecuteQuery(IEntityQuery query)</P><P style="MARGIN: 0in; FONT-FAMILY: 'Comic Sans MS'; COLOR: blue; FONT-SIZE: 9.5pt">Decade.CIW.Connectors.Envision4.EnvisionClassicEntity.GetAgencyInformation() in C:\Decade Software\Corsair\Applications\CERSIntegrationWizard\Decade.CIW.Connectors.Envision4\EnvisionClassicEntityRead.cs: line 26</P><P style="MARGIN: 0in; FONT-FAMILY: 'Comic Sans MS'; COLOR: blue; FONT-SIZE: 9.5pt">Decade.CIW.Connectors.Envision4.Tests.EnvisionClassicEntityReadTest.GetAgencyInformation_WhenCalled_ReturnsResult() in C:\Decade Software\Corsair\Applications\CERSIntegrationWizard\Decade.CIW.Connectors.Envision4.Tests\EnvisionClassicEntityReadTest.cs: line 77</P><DIV></DIV></DIV>]]>
   </description>
   <pubDate>Mon, 14 Nov 2011 14:10:24 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2967&amp;PID=12054#12054</guid>
  </item> 
  <item>
   <title>EntityManagerSaveException: No CodeFirst entities were found : Thanks for your answer. The problem...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2967&amp;PID=11694#11694</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1275" rel="nofollow">Engo</a><br /><strong>Subject:</strong> 2967<br /><strong>Posted:</strong> 21-Sep-2011 at 10:37am<br /><br />Thanks for your answer. The problem was that I renamed the connection string but did not copy that renamed value into the server config.]]>
   </description>
   <pubDate>Wed, 21 Sep 2011 10:37:10 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2967&amp;PID=11694#11694</guid>
  </item> 
  <item>
   <title>EntityManagerSaveException: No CodeFirst entities were found : Hi Engo,It looks like you are...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2967&amp;PID=11691#11691</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> 2967<br /><strong>Posted:</strong> 21-Sep-2011 at 6:45am<br /><br />Hi Engo,<div><br></div><div>It looks like you are missing the connectionString in your App.config/Web.config file.</div><div><br></div><div>Sorry the error message is not very clear. The message will be more informational on DevForce 6.1.3.</div><div><br></div><div>Regards,</div><div>&nbsp; &nbsp;Silvio.</div>]]>
   </description>
   <pubDate>Wed, 21 Sep 2011 06:45:23 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2967&amp;PID=11691#11691</guid>
  </item> 
  <item>
   <title>EntityManagerSaveException: No CodeFirst entities were found : I&amp;#039;m trying to store a single...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2967&amp;PID=11689#11689</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1275" rel="nofollow">Engo</a><br /><strong>Subject:</strong> 2967<br /><strong>Posted:</strong> 21-Sep-2011 at 2:51am<br /><br /><span ="Apple-style-span" style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; "><div style=": rgb255, 255, 255; margin-left: 1px; margin-top: 1px; margin-right: 1px; margin-bottom: 1px; font-family: Verdana, Arial, Helvetica, sans-serif; color: rgb0, 0, 0; font-size: 12px; line-height: 1.4; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; -: n&#111;ne; ">I'm trying to store a single new entity which I create with the following code:<div><br></div><div><div>var systemUser = mgr.CreateEntity&lt;SYSTEM_USER&gt;();</div><div>systemUser.EntityAspect.AddToManager();</div><div>systemUser.syspasswordhash = vsPasswordHash;</div><div>systemUser.sysuser = psUsername;</div><div>systemUser.sysdomain = psDomain;</div><div>mgr.SaveChanges();</div></div><div><br></div><div>This gives me the following exception (when SaveChanges is invoked)</div><div><br></div><div><div>&#091;IdeaBlade.EntityModel.EntityManagerSaveException&#093;<span ="Apple-tab-span" style="white-space: pre; ">	</span>{"Key 'FortressManager': Error in DbKey EntityManager: &nbsp;No CodeFirst entities were found in assembly model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"}<span ="Apple-tab-span" style="white-space: pre; ">	</span>IdeaBlade.EntityModel.EntityManagerSaveException</div></div><div><br></div><div><br></div><div>Maybe someone can help me here, because I did not use any code first functionality (just generated the model from the database).</div><div><br></div></div></span>]]>
   </description>
   <pubDate>Wed, 21 Sep 2011 02:51:49 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2967&amp;PID=11689#11689</guid>
  </item> 
 </channel>
</rss>