﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>BBS.PROGENIC.COM / The Scene / Scene Releases  / C# Property class generator / Latest Posts</title><generator>InstantForum.NET v4.1.2</generator><description>BBS.PROGENIC.COM</description><link>http://bbs.progenic.com/</link><webMaster>noreply@progenic.com</webMaster><lastBuildDate>Sun, 23 Nov 2008 08:32:07 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: C# Property class generator</title><link>http://bbs.progenic.com/Topic168-11-1.aspx</link><description>sample code to get customers and a bunch of tables related to them due to FK constraints:&lt;br&gt;&lt;br&gt;&lt;pre&gt;int userID = -1; // whatever&lt;br&gt;&lt;br&gt;PredicateExpression                 expression  = new PredicateExpression(CustomersFields.UserId == userID);&lt;br&gt;EntityCollection&lt;CustomersEntity&gt;   customers   = new EntityCollection&lt;CustomersEntity&gt;();&lt;br&gt;&lt;br&gt;IPrefetchPath2 path = new PrefetchPath2((int) EntityType.CustomersEntity);&lt;br&gt;path.Add(CustomersEntity.PrefetchPathAccounts);&lt;br&gt;&lt;br&gt;path.Add(CustomersEntity.PrefetchPathCountries);&lt;br&gt;path.Add(CustomersEntity.PrefetchPathCustomerAccounts).&lt;br&gt;    SubPath.Add(CustomerAccountsEntity.PrefetchPathAccounts).&lt;br&gt;    SubPath.Add(AccountsEntity.PrefetchPathTaxAccounts).&lt;br&gt;    SubPath.Add(TaxAccountsEntity.PrefetchPathTaxes);&lt;br&gt;&lt;br&gt;&lt;br&gt;using (DataAccessAdapter adapter = new DataAccessAdapter()){&lt;br&gt;    adapter.FetchEntityCollection(customers, new RelationPredicateBucket(expression), 1, null, path);&lt;br&gt;}&lt;br&gt;&lt;br&gt;// now do something with the collection&lt;/pre&gt;&lt;br&gt;let me know if you want some examples of other stuff.&lt;br&gt;&lt;br&gt;fetching a customer based on PK is just as easy as&lt;br&gt;&lt;br&gt;&lt;pre&gt;CustomersEntity customer = new CustomersEntity(customerID);&lt;br&gt;using(DataAccessAdapter adapter = new DataAccessAdapter()){&lt;br&gt;   adapter.FetchEntity(customer);&lt;br&gt;}&lt;/pre&gt;&lt;br&gt;you use prefetch path to do the equiv of 'left outer joins'. i.e. it will get the other tables linked if available. you can use 'bucket.Relations.' to force an 'inner join' such that rows are only returned if everything exists. let me know if you want an example of this.</description><pubDate>Fri, 06 Jun 2008 22:46:37 GMT</pubDate><dc:creator>lok</dc:creator></item><item><title>RE: C# Property class generator</title><link>http://bbs.progenic.com/Topic168-11-1.aspx</link><description>cool thanks, yea i read enough to realise adapter was the way to go &lt;img align="absmiddle" src="http://bbs.progenic.com/Skins/Common/EmotIcons/Smile.gif" border="0" title="Smile"&gt;</description><pubDate>Fri, 06 Jun 2008 08:19:36 GMT</pubDate><dc:creator>proge</dc:creator></item><item><title>RE: C# Property class generator</title><link>http://bbs.progenic.com/Topic168-11-1.aspx</link><description>proge i didn't learn llblgen from a book or anything [company i worked at had projects in it]&lt;br&gt;&lt;br&gt;i can maybe whip up a sample or two for you later [when i'm at work]&lt;br&gt;&lt;br&gt;best place for llblgen,help at least, is the forums at llblgen.com&lt;br&gt;&lt;br&gt;the .chm that comes with the llblgen install is also a nice place for tips/etc&lt;br&gt;&lt;br&gt;we use it in adapter mode (not self-servicing). adapter is the better way.&lt;br&gt;&lt;br&gt;will post some 'typical' snippets tommorow</description><pubDate>Thu, 05 Jun 2008 09:34:13 GMT</pubDate><dc:creator>lok</dc:creator></item><item><title>RE: C# Property class generator</title><link>http://bbs.progenic.com/Topic168-11-1.aspx</link><description>lok can you point me in the direction of any resources you know that might help me learn. So far i've set it up on one of my databases and managed to use the dataadapter and a entity class.&lt;P&gt;I found this ebook &lt;A href="http://www.lulu.com/content/174470" target=_Blank&gt;http://www.lulu.com/content/174470&lt;/A&gt;, do you know of any other books?&lt;P&gt;@wax&lt;P&gt;have you been using linq at all? i'm a bit lost to be honest just be reading through this&lt;P&gt;&lt;A href="http://weblogs.asp.net/fbouma/archive/2008/05/19/why-use-the-entity-framework-yeah-why-exactly.aspx"&gt;http://weblogs.asp.net/fbouma/archive/2008/05/19/why-use-the-entity-framework-yeah-why-exactly.aspx&lt;/A&gt;&lt;P&gt;and the comments, it seems there's a firey debate raging over what is best to use and i'm trying to work out the truth between the different philosophys.&lt;P&gt;Could you explain why link2sql makes the need for stuff like llblgen redundant?</description><pubDate>Wed, 04 Jun 2008 16:01:30 GMT</pubDate><dc:creator>proge</dc:creator></item><item><title>RE: C# Property class generator</title><link>http://bbs.progenic.com/Topic168-11-1.aspx</link><description>Nice post...</description><pubDate>Tue, 03 Jun 2008 02:52:36 GMT</pubDate><dc:creator>silicon002</dc:creator></item><item><title>RE: C# Property class generator</title><link>http://bbs.progenic.com/Topic168-11-1.aspx</link><description>cheers &lt;img align="absmiddle" src="http://bbs.progenic.com/Skins/Common/EmotIcons/Smile.gif" border="0" title="Smile"&gt;</description><pubDate>Thu, 29 May 2008 08:13:22 GMT</pubDate><dc:creator>proge</dc:creator></item><item><title>RE: C# Property class generator</title><link>http://bbs.progenic.com/Topic168-11-1.aspx</link><description>&lt;div class="Quote"&gt;&lt;b&gt;proge (5/28/2008)&lt;/b&gt;&lt;hr noshade size="1" class="hr"&gt;lok pm me with contact details, you've disabled pms.&lt;br&gt;&lt;br&gt;What about LINQ and the ADO.NET Entity framework. Do you think it's worth me learning llbgen or would this be better?&lt;br&gt;&lt;br&gt;&lt;A target='_Blank' href="http://msdn.microsoft.com/en-us/library/aa697427(VS.80).aspx"&gt;http://msdn.microsoft.com/en-us/library/aa697427(VS.80).aspx&lt;/A&gt;&lt;/div&gt;&lt;br&gt;llblgen has a linq to llblgen component which is much better, so i'd go with that. i'm personally not a fan on linq honestly, but frans' articles on it can be found here:&lt;br&gt;&lt;br&gt;&lt;a href='http://weblogs.asp.net/fbouma/default.aspx'&gt;http://weblogs.asp.net/fbouma/default.aspx&lt;/a&gt;</description><pubDate>Wed, 28 May 2008 17:35:53 GMT</pubDate><dc:creator>lok</dc:creator></item><item><title>RE: C# Property class generator</title><link>http://bbs.progenic.com/Topic168-11-1.aspx</link><description>Nah lok, O/R mappers are complete overkill for what this little tool was written for all this time ago.&lt;P&gt;And these days I'm not going to waste my time on a O/R mapper now that LINQ/LINQ2SQL is sorted. &lt;/P&gt;&lt;P&gt;(And yes, Bouma is practical but his posts are just non stop advertisements for LLBGen and flames directed at anything that's direct competition to it.. the guy invented tunnel vision)</description><pubDate>Wed, 28 May 2008 14:06:09 GMT</pubDate><dc:creator>wax</dc:creator></item><item><title>RE: C# Property class generator</title><link>http://bbs.progenic.com/Topic168-11-1.aspx</link><description>lok pm me with contact details, you've disabled pms.&lt;P&gt;What about LINQ and the ADO.NET Entity framework. Do you think it's worth me learning llbgen or would this be better?&lt;/P&gt;&lt;P&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/aa697427(VS.80).aspx"&gt;http://msdn.microsoft.com/en-us/library/aa697427(VS.80).aspx&lt;/A&gt;</description><pubDate>Wed, 28 May 2008 12:41:12 GMT</pubDate><dc:creator>proge</dc:creator></item><item><title>RE: C# Property class generator</title><link>http://bbs.progenic.com/Topic168-11-1.aspx</link><description>yeah it's easily worth the few $$ for the pro version. guy that writes it (frans bouma) is very smart/practical guy. stopped me from writing my own orm (like wax's) when i found it.</description><pubDate>Tue, 27 May 2008 18:29:53 GMT</pubDate><dc:creator>lok</dc:creator></item><item><title>RE: C# Property class generator</title><link>http://bbs.progenic.com/Topic168-11-1.aspx</link><description>looks sexy i'm gonna play with that tomorrow, intro vid on here shows it off nicely&lt;/P&gt;&lt;P&gt;&lt;A target='_Blank' href="http://www.netfxharmonics.com/2006/03/llblgen-overview-special-edition-video.aspx"&gt;http://www.netfxharmonics.com/2006/03/llblgen-overview-special-edition-video.aspx&lt;/A&gt;</description><pubDate>Tue, 27 May 2008 18:24:51 GMT</pubDate><dc:creator>proge</dc:creator></item><item><title>RE: C# Property class generator</title><link>http://bbs.progenic.com/Topic168-11-1.aspx</link><description>nice mate but have you seen llblgen? it's what we use at work as an o/r mapper. definitely the best around.</description><pubDate>Tue, 27 May 2008 18:10:40 GMT</pubDate><dc:creator>lok</dc:creator></item><item><title>RE: C# Property class generator</title><link>http://bbs.progenic.com/Topic168-11-1.aspx</link><description>Download:&lt;P&gt;&lt;A target='_Blank' href="http://www.videoripper.net/images/DBPropertyGenerator.zip"&gt;http://www.videoripper.net/images/DBPropertyGenerator.zip&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Screenshot:&lt;/P&gt;&lt;P&gt;&lt;img src="http://www.videoripper.net/images/screenshot.gif"&gt;</description><pubDate>Sun, 25 May 2008 12:40:47 GMT</pubDate><dc:creator>wax</dc:creator></item><item><title>RE: C# Property class generator</title><link>http://bbs.progenic.com/Topic168-11-1.aspx</link><description>I'll dig it up and post a fixed link when I'm back from Berlin beginning of next week</description><pubDate>Thu, 22 May 2008 14:56:14 GMT</pubDate><dc:creator>wax</dc:creator></item><item><title>RE: C# Property class generator</title><link>http://bbs.progenic.com/Topic168-11-1.aspx</link><description>link is broken, can you give another link .. please</description><pubDate>Wed, 21 May 2008 22:44:35 GMT</pubDate><dc:creator>MGunawan</dc:creator></item><item><title>RE: C# Property class generator</title><link>http://bbs.progenic.com/Topic168-11-1.aspx</link><description>now &lt;STRONG&gt;that&lt;/STRONG&gt; looks handy..... cheers wax! &lt;img align="absmiddle" src="http://bbs.progenic.com/Skins/Common/EmotIcons/Smile.gif" border="0" title="Smile"&gt;</description><pubDate>Mon, 21 Nov 2005 11:12:01 GMT</pubDate><dc:creator>godhn</dc:creator></item><item><title>C# Property class generator</title><link>http://bbs.progenic.com/Topic168-11-1.aspx</link><description>One of the little tools I created to make life easier. &lt;P&gt;If you're like me and tend to create classes in C# as a sort of in-memory representation of a database table (e.g. a User object) then you'll know how annoying it is to type out / copy paste the fieldnames, their get/set properties and that manually.&lt;/P&gt;&lt;P&gt;So without further ado(.net, pun intended) I present this. Only works with SQLServer (2k/2k5).&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.morphed.org/dbpropgen/DBPropertyGenerator.zip" target=_Blank&gt;http://www.morphed.org/dbpropgen/DBPropertyGenerator.zip&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Sample output:&lt;/P&gt;&lt;P&gt;&lt;img src="http://www.morphed.org/dbpropgen/screenshot.gif"&gt;&lt;/P&gt;&lt;P&gt;Code available if you want or don't trust my code (and you're too lazy to ILDASM it).&lt;P&gt;(Oh yea, it generates the var declarations line by line, I was too lazy to do that properly).&lt;P&gt;(Oh yea, it requires .net framework 2)</description><pubDate>Mon, 21 Nov 2005 08:38:10 GMT</pubDate><dc:creator>wax</dc:creator></item></channel></rss>