<?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 : Multiple Domain Models</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : Community Forum : Multiple Domain Models</description>
  <pubDate>Sat, 11 Apr 2026 05:11:50 -700</pubDate>
  <lastBuildDate>Mon, 20 Aug 2012 17:18:44 -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=3589</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>Multiple Domain Models :  Thanks for the information....</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3589&amp;PID=14242#14242</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1506" rel="nofollow">haighis</a><br /><strong>Subject:</strong> 3589<br /><strong>Posted:</strong> 20-Aug-2012 at 5:18pm<br /><br />Thanks for the information. I ended up reading your links and then I figured it's creating the database when my (or temphire) sample dbcontext is called. &nbsp;This ended up working btw.<span style="font-size:10px"><br /><br />Edited by haighis - 20-Aug-2012 at 5:34pm</span>]]>
   </description>
   <pubDate>Mon, 20 Aug 2012 17:18:44 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3589&amp;PID=14242#14242</guid>
  </item> 
  <item>
   <title>Multiple Domain Models :   Also, you can read more about...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3589&amp;PID=14241#14241</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1005" rel="nofollow">mgood</a><br /><strong>Subject:</strong> 3589<br /><strong>Posted:</strong> 20-Aug-2012 at 4:17pm<br /><br />Also, you can read more about this here.<div>&nbsp;</div><div><a href="http://drc.ideablade.com/xwiki/bin/view/&#068;ocumentati&#111;n/advanced-database-c&#111;nnecti&#111;ns" target="_blank">http://drc.ideablade.com/xwiki/bin/view/Documentation/advanced-database-connections</a></div>]]>
   </description>
   <pubDate>Mon, 20 Aug 2012 16:17:33 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3589&amp;PID=14241#14241</guid>
  </item> 
  <item>
   <title>Multiple Domain Models :   John,The SQL CE database is...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3589&amp;PID=14240#14240</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1005" rel="nofollow">mgood</a><br /><strong>Subject:</strong> 3589<br /><strong>Posted:</strong> 20-Aug-2012 at 4:14pm<br /><br />John,<div>The SQL CE database is automatically created by Entity Framework. That capability is there if you use Code-First. The DbContext class is responsible for further customizing the creation of the database. Following is the DbContext from TempHire. TempHireDbInitializer is responsible for when and how you want EF to create the database. In this case the database is created every time the model changes or the database doesn't exist and then the Seed method is called to fill it with initial data.</div><div>&nbsp;</div><div><pre style=": white; color: black; font-family: C&#111;nsolas;">&nbsp;&nbsp;&nbsp;&#091;<span style="color: rgb43, 145, 175;">DataSourceKeyName</span>(<span style="color: rgb163, 21, 21;">"TempHireEntities"</span>)&#093;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">internal</span>&nbsp;<span style="color: blue;">class</span>&nbsp;<span style="color: rgb43, 145, 175;">TempHireDbContext</span>&nbsp;:&nbsp;<span style="color: rgb43, 145, 175;">DbContext</span>&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">static</span>&nbsp;TempHireDbContext()&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: green;">//&nbsp;This&nbsp;is&nbsp;currently&nbsp;a&nbsp;DevForce&nbsp;requirement&nbsp;in&nbsp;order&nbsp;to&nbsp;use&nbsp;SLQ&nbsp;CE&nbsp;with&nbsp;Code-First.</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: green;">//&nbsp;See&nbsp;http://drc.ideablade.com/xwiki/bin/view/Documentation/code-first-sqlce</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: green;">//&nbsp;Remove&nbsp;if&nbsp;not&nbsp;using&nbsp;SQL&nbsp;CE.</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: rgb43, 145, 175;">Database</span>.DefaultConnectionFactory&nbsp;=&nbsp;<span style="color: blue;">new</span>&nbsp;<span style="color: rgb43, 145, 175;">SqlCeConnectionFactory</span>(<span style="color: rgb163, 21, 21;">"System.Data.SqlServerCe.4.0"</span>);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">public</span>&nbsp;TempHireDbContext(<span style="color: blue;">string</span>&nbsp;connection&nbsp;=&nbsp;<span style="color: blue;">null</span>)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;<span style="color: blue;">base</span>(connection)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: rgb43, 145, 175;">Database</span>.SetInitializer(<span style="color: blue;">new</span>&nbsp;<span style="color: rgb43, 145, 175;">TempHireDbInitializer</span>()); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: green;">//&nbsp;DevForce&nbsp;already&nbsp;performs&nbsp;validation</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Configuration.ValidateOnSaveEnabled&nbsp;=&nbsp;<span style="color: blue;">false</span>;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">public</span>&nbsp;<span style="color: rgb43, 145, 175;">DbSet</span>&lt;<span style="color: rgb43, 145, 175;">StaffingResource</span>&gt;&nbsp;StaffingResources&nbsp;{&nbsp;<span style="color: blue;">get</span>;&nbsp;<span style="color: blue;">set</span>;&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">public</span>&nbsp;<span style="color: rgb43, 145, 175;">DbSet</span>&lt;<span style="color: rgb43, 145, 175;">Address</span>&gt;&nbsp;Addresses&nbsp;{&nbsp;<span style="color: blue;">get</span>;&nbsp;<span style="color: blue;">set</span>;&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">public</span>&nbsp;<span style="color: rgb43, 145, 175;">DbSet</span>&lt;<span style="color: rgb43, 145, 175;">AddressType</span>&gt;&nbsp;AddressTypes&nbsp;{&nbsp;<span style="color: blue;">get</span>;&nbsp;<span style="color: blue;">set</span>;&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">public</span>&nbsp;<span style="color: rgb43, 145, 175;">DbSet</span>&lt;<span style="color: rgb43, 145, 175;">PhoneNumber</span>&gt;&nbsp;PhoneNumbers&nbsp;{&nbsp;<span style="color: blue;">get</span>;&nbsp;<span style="color: blue;">set</span>;&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">public</span>&nbsp;<span style="color: rgb43, 145, 175;">DbSet</span>&lt;<span style="color: rgb43, 145, 175;">PhoneNumberType</span>&gt;&nbsp;PhoneNumberTypes&nbsp;{&nbsp;<span style="color: blue;">get</span>;&nbsp;<span style="color: blue;">set</span>;&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">public</span>&nbsp;<span style="color: rgb43, 145, 175;">DbSet</span>&lt;<span style="color: rgb43, 145, 175;">Rate</span>&gt;&nbsp;Rates&nbsp;{&nbsp;<span style="color: blue;">get</span>;&nbsp;<span style="color: blue;">set</span>;&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">public</span>&nbsp;<span style="color: rgb43, 145, 175;">DbSet</span>&lt;<span style="color: rgb43, 145, 175;">RateType</span>&gt;&nbsp;RateTypes&nbsp;{&nbsp;<span style="color: blue;">get</span>;&nbsp;<span style="color: blue;">set</span>;&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">public</span>&nbsp;<span style="color: rgb43, 145, 175;">DbSet</span>&lt;<span style="color: rgb43, 145, 175;">State</span>&gt;&nbsp;States&nbsp;{&nbsp;<span style="color: blue;">get</span>;&nbsp;<span style="color: blue;">set</span>;&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">public</span>&nbsp;<span style="color: rgb43, 145, 175;">DbSet</span>&lt;<span style="color: rgb43, 145, 175;">WorkExperienceItem</span>&gt;&nbsp;WorkExperienceItems&nbsp;{&nbsp;<span style="color: blue;">get</span>;&nbsp;<span style="color: blue;">set</span>;&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">public</span>&nbsp;<span style="color: rgb43, 145, 175;">DbSet</span>&lt;<span style="color: rgb43, 145, 175;">Skill</span>&gt;&nbsp;Skills&nbsp;{&nbsp;<span style="color: blue;">get</span>;&nbsp;<span style="color: blue;">set</span>;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">protected</span>&nbsp;<span style="color: blue;">override</span>&nbsp;<span style="color: blue;">void</span>&nbsp;OnModelCreating(<span style="color: rgb43, 145, 175;">DbModelBuilder</span>&nbsp;modelBuilder)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;modelBuilder.Ignore&lt;<span style="color: rgb43, 145, 175;">EntityAspect</span>&gt;();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;}</pre></div>]]>
   </description>
   <pubDate>Mon, 20 Aug 2012 16:14:47 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3589&amp;PID=14240#14240</guid>
  </item> 
  <item>
   <title>Multiple Domain Models : Hello,I am working with Cocktail...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3589&amp;PID=14238#14238</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1506" rel="nofollow">haighis</a><br /><strong>Subject:</strong> 3589<br /><strong>Posted:</strong> 20-Aug-2012 at 2:35pm<br /><br />Hello,<div><br></div><div>I am working with Cocktail 1.0 Silverlight. I have created a test domain model with a unitofwork, factory and repository similar to the StaffingResource unitofwork, etc. inside the TempHire sample and I want to know how the SQL CE database is created?&nbsp;</div><div><br></div><div>Thanks,</div><div><br></div><div>John Haigh</div>]]>
   </description>
   <pubDate>Mon, 20 Aug 2012 14:35:57 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3589&amp;PID=14238#14238</guid>
  </item> 
 </channel>
</rss>