BBS.PROGENIC.COM
Home      Members   Calendar   Who's On   SOTM
Welcome Guest ( Login | Register )
      

Home » The Scene » Scene Releases » C# Property class generator

««12

C# Property class generatorExpand / Collapse
Author
Message
Posted Wednesday, May 28, 2008 5:35 PM


Progenic Family

Progenic Family

Group: Old Skool
Last Login: Monday, July 14, 2008 10:40 PM
Posts: 1,064, Visits: 4,353
proge (5/28/2008)
lok pm me with contact details, you've disabled pms.

What about LINQ and the ADO.NET Entity framework. Do you think it's worth me learning llbgen or would this be better?

http://msdn.microsoft.com/en-us/library/aa697427(VS.80).aspx

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:

http://weblogs.asp.net/fbouma/default.aspx

--
http://www.boxofgoodfeelings.com/
http://lets.coozi.com.au/
Post #14613
Posted Thursday, May 29, 2008 8:13 AM


Progenic Crew

Progenic Crew

Group: Administrators
Last Login: Yesterday @ 1:17 PM
Posts: 2,372, Visits: 37,291
cheers

 
Post #14616
Posted Tuesday, June 03, 2008 2:52 AM
New Member

New Member

Group: Forum Members
Last Login: Friday, June 13, 2008 10:46 AM
Posts: 3, Visits: 11
Nice post...
Post #14655
Posted Wednesday, June 04, 2008 4:01 PM


Progenic Crew

Progenic Crew

Group: Administrators
Last Login: Yesterday @ 1:17 PM
Posts: 2,372, Visits: 37,291
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.

I found this ebook http://www.lulu.com/content/174470, do you know of any other books?

@wax

have you been using linq at all? i'm a bit lost to be honest just be reading through this

http://weblogs.asp.net/fbouma/archive/2008/05/19/why-use-the-entity-framework-yeah-why-exactly.aspx

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.

Could you explain why link2sql makes the need for stuff like llblgen redundant?

 

Post #14661
Posted Thursday, June 05, 2008 9:34 AM


Progenic Family

Progenic Family

Group: Old Skool
Last Login: Monday, July 14, 2008 10:40 PM
Posts: 1,064, Visits: 4,353
proge i didn't learn llblgen from a book or anything [company i worked at had projects in it]

i can maybe whip up a sample or two for you later [when i'm at work]

best place for llblgen,help at least, is the forums at llblgen.com

the .chm that comes with the llblgen install is also a nice place for tips/etc

we use it in adapter mode (not self-servicing). adapter is the better way.

will post some 'typical' snippets tommorow

--
http://www.boxofgoodfeelings.com/
http://lets.coozi.com.au/
Post #14664
Posted Friday, June 06, 2008 8:19 AM


Progenic Crew

Progenic Crew

Group: Administrators
Last Login: Yesterday @ 1:17 PM
Posts: 2,372, Visits: 37,291
cool thanks, yea i read enough to realise adapter was the way to go

 
Post #14669
Posted Friday, June 06, 2008 10:46 PM


Progenic Family

Progenic Family

Group: Old Skool
Last Login: Monday, July 14, 2008 10:40 PM
Posts: 1,064, Visits: 4,353
sample code to get customers and a bunch of tables related to them due to FK constraints:

int userID = -1; // whatever

PredicateExpression expression = new PredicateExpression(CustomersFields.UserId == userID);
EntityCollection customers = new EntityCollection();

IPrefetchPath2 path = new PrefetchPath2((int) EntityType.CustomersEntity);
path.Add(CustomersEntity.PrefetchPathAccounts);

path.Add(CustomersEntity.PrefetchPathCountries);
path.Add(CustomersEntity.PrefetchPathCustomerAccounts).
SubPath.Add(CustomerAccountsEntity.PrefetchPathAccounts).
SubPath.Add(AccountsEntity.PrefetchPathTaxAccounts).
SubPath.Add(TaxAccountsEntity.PrefetchPathTaxes);


using (DataAccessAdapter adapter = new DataAccessAdapter()){
adapter.FetchEntityCollection(customers, new RelationPredicateBucket(expression), 1, null, path);
}

// now do something with the collection

let me know if you want some examples of other stuff.

fetching a customer based on PK is just as easy as

CustomersEntity customer = new CustomersEntity(customerID);
using(DataAccessAdapter adapter = new DataAccessAdapter()){
adapter.FetchEntity(customer);
}

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.

--
http://www.boxofgoodfeelings.com/
http://lets.coozi.com.au/
Post #14674
« Prev Topic | Next Topic »

««12

Reading This TopicExpand / Collapse
Active Users: 1 (1 guest, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: proge, wax

All times are GMT -6:00, Time now is 9:30pm

Progenic BBS 2008
Execution: 0.156. 10 queries. Compression Enabled.