Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / March 2006

Tip: Looking for answers? Try searching our database.

some design advice

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
neilmcguigan@gmail.com - 17 Mar 2006 21:33 GMT
hi all

A. what is the preferred way to load an object, say a Customer (from a
db)

1. an instance member on the customer object

customer.Load(id)

2. a static member on the customer class?

Customer.Load(id)

3. an instance member on another class?

customerManager.Load(id)

4. a static member on another class?

CustomerManager.Load(id)

B. What is a good way to load a subset of customers?

CustomerList classFromAbove.GetCustomers(somefilter)

want to be able to specify a filter (with ANDs, ORs, etc) on zero or
more properties of a customer

provide a sort order list

provide a "page" size and "page" number

and get a total recordcount back for items matching the filter

without using sql in the filter, or sort order list :)

Thanks!

Neil
Michael Nemtsev - 17 Mar 2006 22:37 GMT
Hello neilmcguigan@gmail.com,

First case:
1) Create CustomersManagement.Entity namespace that will contain Customer
class
2) Create CustomersManagement.Data namespace with  CustomerData class creating
instances of Customer and returing ArrayList of them

Second case: use O/R mapping and such tools as NHibernate

> hi all

> A. what is the preferred way to load an object, say a Customer (from a
> db)
[quoted text clipped - 33 lines]
>
> Neil

---
WBR,
Michael  Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsch
neilmcguigan@gmail.com - 27 Mar 2006 19:45 GMT
Let's say I didn't want to use O/R mapping...

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.