<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="http://code.msdn.microsoft.com/rss.xsl"?><rss version="2.0"><channel><title>EdmGen2 Forum Rss Feed</title><link>http://code.msdn.microsoft.com/EdmGen2/Thread/List.aspx</link><description>EdmGen2 Forum Rss Description</description><item><title>NEW POST: Defining Primary Keys</title><link>http://code.msdn.microsoft.com/EdmGen2/Thread/View.aspx?ThreadId=2500</link><description>&lt;div class="wikidoc"&gt;
My client has a large database provided by an upline provider. The upline periodically provides database updates, but their tables don't define the primary keys. Updating the tables with code generated from entity models requires primary keys to be generated. &lt;b&gt;grrr&lt;/b&gt; So to regenerate valid models from the new databases we need to manually define the primary keys each time a new version is issued. That's time consuming. We could run a routine that uses Alter Table to set the primary key, but I'd rather set this in the model generated from EdmGen2 (using the source in custom code) rather than having to update the database itself.&lt;br /&gt; &lt;br /&gt;At some point I had code that would parse C# code that was generated from models, and it would add &amp;quot;IsPrimaryKey = true&amp;quot; into the Column Attribute decorating key properties. I'm looking for something more elegant.&lt;br /&gt; &lt;br /&gt;Thanks!&lt;br /&gt;
&lt;/div&gt;</description><author>TonyGravagno</author><pubDate>Wed, 04 Nov 2009 07:23:41 GMT</pubDate><guid isPermaLink="false">NEW POST: Defining Primary Keys 20091104A</guid></item><item><title>NEW POST: Proprietary ConceptualEdmGen.dll ?</title><link>http://code.msdn.microsoft.com/EdmGen2/Thread/View.aspx?ThreadId=2499</link><description>&lt;div class="wikidoc"&gt;
I confess that I've been a bit adverse to using the Retrofit enhancements because they're encapsulated in ConceptualEdmGen.dll which does not come with source.  The &amp;quot;as-is&amp;quot; nature of the Ms-PL license allows for generous distribution of assets contributed to this repository, but it also implies there is no support if anything ever goes wrong. Great, we work with it. But when we don't get source &lt;b&gt;or&lt;/b&gt; support then we're putting ourselves in an awkward position by making use of &amp;quot;stuff found on the 'net&amp;quot;.&lt;br /&gt; &lt;br /&gt;On one hand, I don't want to insult the generosity of Ankit Malpani, James Terwilliger, or anyone else who have contributed, and continue to support that complex effort. I will not ask for that DLL to be published as source.&lt;br /&gt; &lt;br /&gt;On the other hand I'm hoping that this component can be reduced to simply the &amp;quot;rocket science&amp;quot; value-add which they're providing, while rolling the source for the more generic functionality into the EdmGen2 core.&lt;br /&gt; &lt;br /&gt;For example, the code that allows generation for only selected tables seems to be generic compared to the more sophisticated inheritance functionality. Actually, if someone can point me to a place where I can learn how to do this on my own, I'd be happy (teach a man how to fish...).&lt;br /&gt; &lt;br /&gt;Comments are welcome to help provide warm fuzzies for those of us who are shy about making &amp;quot;real&amp;quot; use of code that we can't control/fix/upgrade, etc.&lt;br /&gt; &lt;br /&gt;Thanks!&lt;br /&gt;
&lt;/div&gt;</description><author>TonyGravagno</author><pubDate>Wed, 04 Nov 2009 07:03:32 GMT</pubDate><guid isPermaLink="false">NEW POST: Proprietary ConceptualEdmGen.dll ? 20091104A</guid></item><item><title>NEW POST: Including Views in models</title><link>http://code.msdn.microsoft.com/EdmGen2/Thread/View.aspx?ThreadId=2498</link><description>&lt;div class="wikidoc"&gt;
I've hacked up EdmGen2 into a custom utility that generates a ready-to-use assembly from a GUI, simply by pointing it at a database. I'm going to look into the RetrofitModel enhancement to select only desired tables from the entire database. But I also need to generate models/code to query views. Can someone suggest how to do this?&lt;br /&gt; &lt;br /&gt;Thanks to all involved in the creation of EdmGen and EdmGen2, and especially for posting the source!&lt;br /&gt;
&lt;/div&gt;</description><author>TonyGravagno</author><pubDate>Wed, 04 Nov 2009 06:48:19 GMT</pubDate><guid isPermaLink="false">NEW POST: Including Views in models 20091104A</guid></item><item><title>NEW POST: where are the generated files?</title><link>http://code.msdn.microsoft.com/EdmGen2/Thread/View.aspx?ThreadId=2243</link><description>&lt;div class="wikidoc"&gt;
Hi&lt;br /&gt; &lt;br /&gt;Your software sounds very cool, but when I try to run it I get:&lt;br /&gt;Microsoft Windows XP &lt;a href="http://code.msdn.microsoft.com/EdmGen2/Wiki/View.aspx?title=Version%205.1.2600"&gt;Version 5.1.2600&lt;/a&gt;&lt;br /&gt;(C) Copyright 1985-2001 Microsoft Corp.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;J:\&amp;gt;C:\temp\Debug\EdmGen2 /RetrofitModel &amp;quot;Server=127.0.0.1;Port=5432;User Id=pos&lt;br /&gt;tgres;Password=xxxxx;Database=xxxx;&amp;quot; &amp;quot;Npgsql&amp;quot; &amp;quot;xxxx&amp;quot;&lt;br /&gt;Warning: The data type 'geometry' is not supported, the column 'thepoint_lonlat'&lt;br /&gt; in table 'airgis2.public.airports' was excluded.&lt;br /&gt;Warning: The data type 'geometry' is not supported, the column 'thepoint_meter'&lt;br /&gt;in table 'airgis2.public.airports' was excluded.&lt;br /&gt;Executing rule: Convert Entities to Many-to-Many Relationships&lt;br /&gt;Executing rule: Search for TPH Pattern Via Foreign Key&lt;br /&gt;Executing rule: Search for TPH Pattern Via Discriminator Column&lt;br /&gt;Executing rule: Search for TPH Pattern Via Null Value Patterns&lt;br /&gt;Executing rule: Specialize Associations&lt;br /&gt;Executing rule: Check if Entities Should be Marked as Abstract&lt;br /&gt;Executing rule: Search for TPT Pattern and Vertical Partitioning Via One-to-One&lt;br /&gt;Relationships&lt;br /&gt;Completed&lt;br /&gt; &lt;br /&gt;But I cannot see any created files in the directory that I ran it from. Where can I find them?&lt;br /&gt;Thanks&lt;br /&gt; &lt;br /&gt;
&lt;/div&gt;</description><author>Anton93</author><pubDate>Mon, 07 Sep 2009 07:46:57 GMT</pubDate><guid isPermaLink="false">NEW POST: where are the generated files? 20090907A</guid></item></channel></rss>