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...