<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/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>Feature CTP Walkthrough: Code Only for the Entity Framework (Updated)</title><link>http://blogs.msdn.com/adonet/pages/feature-ctp-walkthrough-code-only-for-the-entity-framework.aspx</link><description>This post covers Code Only improvements in the CTP2 release for VS 2010 Beta2. This walkthrough shows how you can change the default model like specifying property facets and navigation property inverses as well change the default mapping by changing</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Entity Framework CTP with Code Only &amp;ndash; Now Available &amp;laquo;  Framework Madness!</title><link>http://blogs.msdn.com/adonet/pages/feature-ctp-walkthrough-code-only-for-the-entity-framework.aspx#9798530</link><pubDate>Tue, 23 Jun 2009 02:59:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9798530</guid><dc:creator>Entity Framework CTP with Code Only &amp;ndash; Now Available &amp;laquo;  Framework Madness!</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://leriksen71.wordpress.com/2009/06/22/entity-framework-ctp-with-code-only-now-available/"&gt;http://leriksen71.wordpress.com/2009/06/22/entity-framework-ctp-with-code-only-now-available/&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>re: Feature CTP Walkthrough: Code Only for the Entity Framework </title><link>http://blogs.msdn.com/adonet/pages/feature-ctp-walkthrough-code-only-for-the-entity-framework.aspx#9799165</link><pubDate>Tue, 23 Jun 2009 13:17:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9799165</guid><dc:creator>Mikael Henriksson</dc:creator><description>&lt;p&gt;Finally! Huge step in the right direction. This is ultimately what I have wished for x-mas the last couple of years. I suppose I will miss the mappings, hierarchy and complex types but hey. You will be able to make that for the release version right?&lt;/p&gt;
</description></item><item><title>re: Feature CTP Walkthrough: Code Only for the Entity Framework </title><link>http://blogs.msdn.com/adonet/pages/feature-ctp-walkthrough-code-only-for-the-entity-framework.aspx#9801550</link><pubDate>Wed, 24 Jun 2009 17:19:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9801550</guid><dc:creator>Ryan Riley</dc:creator><description>&lt;p&gt;I agree with Mikael; this is a very nice step forward.&lt;/p&gt;
</description></item><item><title>re: Feature CTP Walkthrough: Code Only for the Entity Framework </title><link>http://blogs.msdn.com/adonet/pages/feature-ctp-walkthrough-code-only-for-the-entity-framework.aspx#9802922</link><pubDate>Thu, 25 Jun 2009 07:46:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9802922</guid><dc:creator>Mauricio Rodriguez</dc:creator><description>&lt;p&gt;How testable is the code only approch?????&lt;/p&gt;
</description></item><item><title>re: Feature CTP Walkthrough: Code Only for the Entity Framework </title><link>http://blogs.msdn.com/adonet/pages/feature-ctp-walkthrough-code-only-for-the-entity-framework.aspx#9804879</link><pubDate>Fri, 26 Jun 2009 09:41:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9804879</guid><dc:creator>Jack</dc:creator><description>&lt;p&gt;Very great! It will surely save us lots of time!&lt;/p&gt;
</description></item><item><title>re: Feature CTP Walkthrough: Code Only for the Entity Framework </title><link>http://blogs.msdn.com/adonet/pages/feature-ctp-walkthrough-code-only-for-the-entity-framework.aspx#9807170</link><pubDate>Sun, 28 Jun 2009 10:19:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9807170</guid><dc:creator>Marcelo</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Please, can add a complete sample using a generic repository and unit of work. The actual sample it is not generic.&lt;/p&gt;
&lt;p&gt;A good sample help to learn!&lt;/p&gt;
</description></item><item><title>re: Feature CTP Walkthrough: Code Only for the Entity Framework </title><link>http://blogs.msdn.com/adonet/pages/feature-ctp-walkthrough-code-only-for-the-entity-framework.aspx#9808482</link><pubDate>Mon, 29 Jun 2009 14:04:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9808482</guid><dc:creator>emanuele</dc:creator><description>&lt;p&gt;Very interesting.&lt;/p&gt;
&lt;p&gt;When did you planned to release the beta version?&lt;/p&gt;
</description></item><item><title>re: Feature CTP Walkthrough: Code Only for the Entity Framework </title><link>http://blogs.msdn.com/adonet/pages/feature-ctp-walkthrough-code-only-for-the-entity-framework.aspx#9830368</link><pubDate>Sun, 12 Jul 2009 18:42:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9830368</guid><dc:creator>Eric Hexter</dc:creator><description>&lt;p&gt;I am not sure I like having to specifiy the DefaultContainerName in the ObjectContext. &amp;nbsp;I walked through this sample with my own object model and it seemed that their is some some coupling to the name of my ObjectContext class. If so, why can't the framework infer the name and let me go on? &amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am excited to see more about this feature!&lt;/p&gt;
</description></item><item><title>re: Feature CTP Walkthrough: Code Only for the Entity Framework </title><link>http://blogs.msdn.com/adonet/pages/feature-ctp-walkthrough-code-only-for-the-entity-framework.aspx#9833131</link><pubDate>Tue, 14 Jul 2009 16:35:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9833131</guid><dc:creator>cowgaR</dc:creator><description>&lt;p&gt;great work, reminds NHibernate with fluent mappings more and more...but couple of questions:&lt;/p&gt;
&lt;p&gt;1. why is the &amp;quot;connection&amp;quot; passed in constructor in the Context, when all the other ORMs have it in some kind of Factory, e.g. ContextBuilder here (I'm entity framework newbie).&lt;/p&gt;
&lt;p&gt;The factory then builds the &amp;quot;sessions&amp;quot;/&amp;quot;uow&amp;quot; e.g. Contexts in this case with this information, the other ORMs are trying to keep the session as lightweight as possible (as usually you will be creating Context per request in web apps).&lt;/p&gt;
&lt;p&gt;2. in your Category class you should probably instantiate _products collection in a constructor,&lt;/p&gt;
&lt;p&gt;it is much clearer solution (also found all around the web).&lt;/p&gt;
&lt;p&gt;3. Where can I define identity strategy for the (primary) key? e.g. GUID COMB and so on?&lt;/p&gt;
&lt;p&gt;4. Why do you need provider model? Haven't looked deeply on Entity Framework but it smells like the bad design for me. Shouldn't you reuse the providers already built in and push code-only-model (or transfer it) to an established designer model, which of course understands providers (so If I am using say sqlite one it works out of the box). Just I don't get it, when I can create table/update schema/change relationships using designer on say Oracle database, why can't I just do it with code-only, which should just be another layer.&lt;/p&gt;
&lt;p&gt;5. I hope the listed limitation will be addressed, as they are really the barebone of what is needed, nice project for you to look at (which is much further in this) is&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://fluentnhibernate.org/"&gt;http://fluentnhibernate.org/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;started by Mr. Gregory, and in many points it has even nicer design.&lt;/p&gt;
&lt;p&gt;As I haven't been followint EF some questions may sound silly, but code-only approach surprised me so definitely going to play with it. Good luck, finaly the right way to do an ORM!&lt;/p&gt;
</description></item><item><title>re: Feature CTP Walkthrough: Code Only for the Entity Framework </title><link>http://blogs.msdn.com/adonet/pages/feature-ctp-walkthrough-code-only-for-the-entity-framework.aspx#9833158</link><pubDate>Tue, 14 Jul 2009 17:03:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9833158</guid><dc:creator>Eric Hexter</dc:creator><description>&lt;p&gt;After going through the walkthrough my biggest complaint with the current bits is that the foreign key is only generated when I expose a List&amp;lt;foo&amp;gt; as a public virtual property. I would much rather create somthing like this and have EF access a private or protected member of my class:&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;public class UserGroup&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;private List&amp;lt;Conference&amp;gt; _conference=new List&amp;lt;Conference&amp;gt;();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public virtual &amp;nbsp;void AddConference(Conference conference)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_conference.Add(conference);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public virtual Conference[] GetAllConferences()&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return _conference.ToArray();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;This way my domain object can apply rules around how conferences are removed from my UserGroup object.&lt;/p&gt;
&lt;p&gt;This code is part of the CodeCampServer.org project that I am testing the CodeOnly features against.&lt;/p&gt;
</description></item><item><title>re: Feature CTP Walkthrough: Code Only for the Entity Framework </title><link>http://blogs.msdn.com/adonet/pages/feature-ctp-walkthrough-code-only-for-the-entity-framework.aspx#9859909</link><pubDate>Fri, 07 Aug 2009 09:08:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9859909</guid><dc:creator>Damien Guard</dc:creator><description>&lt;p&gt;@cowgaR:&lt;/p&gt;
&lt;p&gt;1. Not in scope for this project.&lt;/p&gt;
&lt;p&gt;2. Personal style choice, not enforced.&lt;/p&gt;
&lt;p&gt;3. Coming in next CTP.&lt;/p&gt;
&lt;p&gt;4. Because the existing provider model does not support DDL for create/drop/exists database. If you don't need those then it could run with an existing provider.&lt;/p&gt;
&lt;p&gt;5. We have more stuff coming.&lt;/p&gt;
&lt;p&gt;[)amien&lt;/p&gt;
</description></item><item><title>re: Feature CTP Walkthrough: Code Only for the Entity Framework </title><link>http://blogs.msdn.com/adonet/pages/feature-ctp-walkthrough-code-only-for-the-entity-framework.aspx#9882558</link><pubDate>Mon, 24 Aug 2009 13:40:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9882558</guid><dc:creator>progame</dc:creator><description>&lt;p&gt;hope to support full custom mapping for entityset info just like IQToolKit,&lt;/p&gt;
&lt;p&gt;so i can support partial fields loading and different name convidence mapping.&lt;/p&gt;
</description></item><item><title>re: Feature CTP Walkthrough: Code Only for the Entity Framework (Updated)</title><link>http://blogs.msdn.com/adonet/pages/feature-ctp-walkthrough-code-only-for-the-entity-framework.aspx#9922384</link><pubDate>Sat, 14 Nov 2009 04:07:11 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9922384</guid><dc:creator>progame</dc:creator><description>&lt;p&gt; still can't include both property in entity:&lt;/p&gt;
&lt;p&gt; public int Owner_ID { get; set; }&lt;/p&gt;
&lt;p&gt; public User Owner { get; set; }&lt;/p&gt;
&lt;p&gt;owner is for linq query, owner_id is for insert and data load for datatable.&lt;/p&gt;
&lt;p&gt;class and object is not the whole world. we still need table and datable.&lt;/p&gt;
</description></item><item><title>re: Feature CTP Walkthrough: Code Only for the Entity Framework (Updated)</title><link>http://blogs.msdn.com/adonet/pages/feature-ctp-walkthrough-code-only-for-the-entity-framework.aspx#9922550</link><pubDate>Sun, 15 Nov 2009 00:01:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9922550</guid><dc:creator>xepaul</dc:creator><description>&lt;p&gt;Can you post a f# source code version please, whats the best way to deal with Expression&amp;lt;Func&amp;lt;T,TResult&amp;gt;&amp;gt; in F# ?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
</description></item><item><title>re: Feature CTP Walkthrough: Code Only for the Entity Framework (Updated)</title><link>http://blogs.msdn.com/adonet/pages/feature-ctp-walkthrough-code-only-for-the-entity-framework.aspx#9922761</link><pubDate>Mon, 16 Nov 2009 01:18:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9922761</guid><dc:creator>Roberto Hernandez</dc:creator><description>&lt;p&gt;How do you handle Lazy/Eager loading scenarios when using the &amp;quot;Code Only Model&amp;quot; ?&lt;/p&gt;
&lt;p&gt;Roberto.-&lt;/p&gt;
</description></item><item><title>re: Feature CTP Walkthrough: Code Only for the Entity Framework (Updated)</title><link>http://blogs.msdn.com/adonet/pages/feature-ctp-walkthrough-code-only-for-the-entity-framework.aspx#9924259</link><pubDate>Wed, 18 Nov 2009 13:14:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9924259</guid><dc:creator>Ralf</dc:creator><description>&lt;p&gt;Would it be possible to map the Discrimator column&lt;/p&gt;
&lt;p&gt;in TPH inheritance, i.e. make it visible in an entity&lt;/p&gt;
&lt;p&gt;of the hierarchy, similar to foreign key mapping.&lt;/p&gt;
</description></item></channel></rss>