<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments for Benny Michielsen</title>
	<atom:link href="http://blog.bennymichielsen.be/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.bennymichielsen.be</link>
	<description>.net developer with a touch of Cocoa</description>
	<lastBuildDate>Sat, 03 Dec 2011 15:56:05 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>Comment on Legacy Code Retreat Leuven by Tim Mahy</title>
		<link>http://blog.bennymichielsen.be/2011/11/28/legacy-code-retreat-leuven/#comment-263</link>
		<dc:creator>Tim Mahy</dc:creator>
		<pubDate>Sat, 03 Dec 2011 15:56:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.bennymichielsen.be/2011/11/28/legacy-code-retreat-leuven/#comment-263</guid>
		<description>&quot;Probably need to look a bit into functional programming as it was quite interesting.&quot; damn right :) :)</description>
		<content:encoded><![CDATA[<p>&#8220;Probably need to look a bit into functional programming as it was quite interesting.&#8221; damn right <img src='http://blog.bennymichielsen.be/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  <img src='http://blog.bennymichielsen.be/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Entity Framework 4.1 &#8211; Change mappings at runtime by BennyM</title>
		<link>http://blog.bennymichielsen.be/2011/05/21/entity-framework-4-1-change-mappings-at-runtime/#comment-262</link>
		<dc:creator>BennyM</dc:creator>
		<pubDate>Sat, 03 Dec 2011 11:00:14 +0000</pubDate>
		<guid isPermaLink="false">http://blog.bennymichielsen.be/?p=975#comment-262</guid>
		<description>Are you mixing Code First with Model or DB first models? That&#039;s not possible. Move them to other assemblies and try again.</description>
		<content:encoded><![CDATA[<p>Are you mixing Code First with Model or DB first models? That&#8217;s not possible. Move them to other assemblies and try again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Entity Framework 4.1 &#8211; Change mappings at runtime by BennyM</title>
		<link>http://blog.bennymichielsen.be/2011/05/21/entity-framework-4-1-change-mappings-at-runtime/#comment-261</link>
		<dc:creator>BennyM</dc:creator>
		<pubDate>Sat, 03 Dec 2011 10:59:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.bennymichielsen.be/?p=975#comment-261</guid>
		<description>Will be hard with Entity Framework. NHibernate has something which you can use look here: http://ayende.com/blog/4776/support-dynamic-fields-with-nhibernate-and-net-4-0 . If you really need this with EF the best way would be a dictionary, but that&#039;s not possible with EF either. So you&#039;ll need to create your own &quot;key value&quot; pair class and have a list of those in your entity to support it. I don&#039;t know there&#039;s an easy way.</description>
		<content:encoded><![CDATA[<p>Will be hard with Entity Framework. NHibernate has something which you can use look here: <a href="http://ayende.com/blog/4776/support-dynamic-fields-with-nhibernate-and-net-4-0" rel="nofollow">http://ayende.com/blog/4776/support-dynamic-fields-with-nhibernate-and-net-4-0</a> . If you really need this with EF the best way would be a dictionary, but that&#8217;s not possible with EF either. So you&#8217;ll need to create your own &#8220;key value&#8221; pair class and have a list of those in your entity to support it. I don&#8217;t know there&#8217;s an easy way.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Entity Framework 4.1 &#8211; Change mappings at runtime by BennyM</title>
		<link>http://blog.bennymichielsen.be/2011/05/21/entity-framework-4-1-change-mappings-at-runtime/#comment-260</link>
		<dc:creator>BennyM</dc:creator>
		<pubDate>Sat, 03 Dec 2011 10:54:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.bennymichielsen.be/?p=975#comment-260</guid>
		<description>And what question would that be?</description>
		<content:encoded><![CDATA[<p>And what question would that be?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using Fluent NHibernate in Spring.Net by Amr Ellafy</title>
		<link>http://blog.bennymichielsen.be/2009/01/04/using-fluent-nhibernate-in-spring-net/#comment-257</link>
		<dc:creator>Amr Ellafy</dc:creator>
		<pubDate>Mon, 28 Nov 2011 08:16:01 +0000</pubDate>
		<guid isPermaLink="false">/post/2009/01/04/Using-Fluent-NHibernate-in-SpringNet.aspx#comment-257</guid>
		<description>here is the implementation if you are using FluentNhibernate auto mapping :

protected override void PostProcessConfiguration(Configuration config)
        {
            base.PostProcessConfiguration(config);

            var autoMappingCfg = new AutoMappingConfiguration();

            var autoMap = AutoMap.AssemblyOf(autoMappingCfg)
                                 .Conventions.Add(DefaultCascade.All(), DefaultLazy.Never())
                                 .Conventions.Add()
                                 .Override(map =&gt; { map.IgnoreProperty(i =&gt; i.Total); });

            Fluently.Configure(config)
                    .Mappings(m =&gt; m.AutoMappings.Add(autoMap))
                    .BuildConfiguration();
        }

in outmapping you don&#039;t need to inject FluentNhibernateMappingAssemblies. so configure Sping.Net accordingly</description>
		<content:encoded><![CDATA[<p>here is the implementation if you are using FluentNhibernate auto mapping :</p>
<p>protected override void PostProcessConfiguration(Configuration config)<br />
        {<br />
            base.PostProcessConfiguration(config);</p>
<p>            var autoMappingCfg = new AutoMappingConfiguration();</p>
<p>            var autoMap = AutoMap.AssemblyOf(autoMappingCfg)<br />
                                 .Conventions.Add(DefaultCascade.All(), DefaultLazy.Never())<br />
                                 .Conventions.Add()<br />
                                 .Override(map =&gt; { map.IgnoreProperty(i =&gt; i.Total); });</p>
<p>            Fluently.Configure(config)<br />
                    .Mappings(m =&gt; m.AutoMappings.Add(autoMap))<br />
                    .BuildConfiguration();<br />
        }</p>
<p>in outmapping you don&#8217;t need to inject FluentNhibernateMappingAssemblies. so configure Sping.Net accordingly</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Entity Framework 4.1 &#8211; Change mappings at runtime by Vedran Zdesic</title>
		<link>http://blog.bennymichielsen.be/2011/05/21/entity-framework-4-1-change-mappings-at-runtime/#comment-256</link>
		<dc:creator>Vedran Zdesic</dc:creator>
		<pubDate>Fri, 25 Nov 2011 14:27:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.bennymichielsen.be/?p=975#comment-256</guid>
		<description>Hello, 

I am trying to change mappings dinamically on my edmx by using DBModelBuilder, as suggested but I am getting following error:

The type &#039;MyEntityType&#039; was not mapped. Check that the type has not been explicitly excluded by using the Ignore method or NotMappedAttribute data annotation. Verify that the type was defined as a class, is not primitive, nested or generic, and does not inherit from EntityObject.

I thought that for EntityObjects it will be possible, but error tells me that it is not. Why?

I want to change mapping dinamically because I have the same sets of tables in database which are differed only for a suffix. I would like to have one model which I can switch between sets. I included in my project and I work with solution from codeplex: http://efmodeladapter.codeplex.com/

What is solution for that?  

Vedran</description>
		<content:encoded><![CDATA[<p>Hello, </p>
<p>I am trying to change mappings dinamically on my edmx by using DBModelBuilder, as suggested but I am getting following error:</p>
<p>The type &#8216;MyEntityType&#8217; was not mapped. Check that the type has not been explicitly excluded by using the Ignore method or NotMappedAttribute data annotation. Verify that the type was defined as a class, is not primitive, nested or generic, and does not inherit from EntityObject.</p>
<p>I thought that for EntityObjects it will be possible, but error tells me that it is not. Why?</p>
<p>I want to change mapping dinamically because I have the same sets of tables in database which are differed only for a suffix. I would like to have one model which I can switch between sets. I included in my project and I work with solution from codeplex: <a href="http://efmodeladapter.codeplex.com/" rel="nofollow">http://efmodeladapter.codeplex.com/</a></p>
<p>What is solution for that?  </p>
<p>Vedran</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Changing Entity Framework model at runtime by Jingming</title>
		<link>http://blog.bennymichielsen.be/2010/12/05/changing-entity-framework-model-at-runtime/#comment-252</link>
		<dc:creator>Jingming</dc:creator>
		<pubDate>Thu, 29 Sep 2011 20:03:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.bennymichielsen.be/?p=870#comment-252</guid>
		<description>Unfortunately it did not work for me. Please help.
I&#039;m using VS2010 and EF4.1. I got exception like this:
The EntityContainer name could not be determined. The provided EntitySet name must be qualified by the EntityContainer name, such as &#039;EntityContainerName.EntitySetName&#039;, or the DefaultContainerName property must be set for the ObjectContext.
Parameter name: entitySetName</description>
		<content:encoded><![CDATA[<p>Unfortunately it did not work for me. Please help.<br />
I&#8217;m using VS2010 and EF4.1. I got exception like this:<br />
The EntityContainer name could not be determined. The provided EntitySet name must be qualified by the EntityContainer name, such as &#8216;EntityContainerName.EntitySetName&#8217;, or the DefaultContainerName property must be set for the ObjectContext.<br />
Parameter name: entitySetName</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Entity Framework 4.1 Inheritance &#8211; Table per Hierarchy by Stuart Batty</title>
		<link>http://blog.bennymichielsen.be/2011/05/20/entity-framework-inheritance-4-1-table-per-hierarchy/#comment-238</link>
		<dc:creator>Stuart Batty</dc:creator>
		<pubDate>Tue, 20 Sep 2011 21:37:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.bennymichielsen.be/?p=939#comment-238</guid>
		<description>Good article, if a little brief. Especially handy was the OnModelCreating override code. Thanks.</description>
		<content:encoded><![CDATA[<p>Good article, if a little brief. Especially handy was the OnModelCreating override code. Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Entity Framework 4.1 &#8211; Change mappings at runtime by Abhishek Jain</title>
		<link>http://blog.bennymichielsen.be/2011/05/21/entity-framework-4-1-change-mappings-at-runtime/#comment-237</link>
		<dc:creator>Abhishek Jain</dc:creator>
		<pubDate>Mon, 12 Sep 2011 14:56:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.bennymichielsen.be/?p=975#comment-237</guid>
		<description>Wonderful post Benny! I was wondering if there is any way to discover run time schema (say user defined columns in existing table) and then map them to a lsit  of values (or something similar) in relevant type.
Consider following example
public partial class Customer
{
     [Key] 
     public int Id {get; set;}
     public string Name {get; set;}
}
This type maps to an sql table Customer with two columns Id and Name. Now if the system allows user to add  custom columns say (U_User1, U_User2...) to the table Customer. How this can be accomodated in EF 4.1? I believe that Customer class needs one more list that can hold these user defined values. But how this can be mapped at run time?</description>
		<content:encoded><![CDATA[<p>Wonderful post Benny! I was wondering if there is any way to discover run time schema (say user defined columns in existing table) and then map them to a lsit  of values (or something similar) in relevant type.<br />
Consider following example<br />
public partial class Customer<br />
{<br />
     [Key]<br />
     public int Id {get; set;}<br />
     public string Name {get; set;}<br />
}<br />
This type maps to an sql table Customer with two columns Id and Name. Now if the system allows user to add  custom columns say (U_User1, U_User2&#8230;) to the table Customer. How this can be accomodated in EF 4.1? I believe that Customer class needs one more list that can hold these user defined values. But how this can be mapped at run time?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Entity Framework 4.1 &#8211; Change mappings at runtime by persian developer</title>
		<link>http://blog.bennymichielsen.be/2011/05/21/entity-framework-4-1-change-mappings-at-runtime/#comment-236</link>
		<dc:creator>persian developer</dc:creator>
		<pubDate>Mon, 12 Sep 2011 07:18:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.bennymichielsen.be/?p=975#comment-236</guid>
		<description>Hi, i have been googling and found your article. Would you please take a look at this question [https://blogs.msdn.com/b/adonet/archive/2010/12/14/ef-feature-ctp5-fluent-api-samples.aspx] and say whether your solution can help me? Thanks.</description>
		<content:encoded><![CDATA[<p>Hi, i have been googling and found your article. Would you please take a look at this question [https://blogs.msdn.com/b/adonet/archive/2010/12/14/ef-feature-ctp5-fluent-api-samples.aspx] and say whether your solution can help me? Thanks.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

