Click here to Skip to main content
15,891,253 members
Home / Discussions / C#
   

C#

 
AnswerRe: help me out pls Pin
CodingYoshi16-Jan-09 20:35
CodingYoshi16-Jan-09 20:35 
GeneralRe: help me out pls Pin
lawrenceinba16-Jan-09 21:01
lawrenceinba16-Jan-09 21:01 
QuestionHow to add icon in control pannel using c# Pin
azad yadav16-Jan-09 17:35
azad yadav16-Jan-09 17:35 
AnswerRe: How to add icon in control pannel using c# Pin
Luc Pattyn16-Jan-09 18:17
sitebuilderLuc Pattyn16-Jan-09 18:17 
QuestionCreate window user in c# Pin
azad yadav16-Jan-09 17:04
azad yadav16-Jan-09 17:04 
AnswerRe: Create window user in c# Pin
EliottA16-Jan-09 21:29
EliottA16-Jan-09 21:29 
QuestionNew explorer menu design samples Pin
phoopwint16-Jan-09 16:42
phoopwint16-Jan-09 16:42 
QuestionBusiness Objects Pin
CodingYoshi16-Jan-09 12:30
CodingYoshi16-Jan-09 12:30 
Lets say I have a few business objects such as Customer, CustomerCollection, Order, OrderCollection, Product and ProductCollection. The Customer object will have an OrderCollection object and Order object will have ProductCollection. The Customer will know all its orders because it has an OrderCollection, now

Should each OrderCollection or Order also have a reference to Customer so they know who they belong to? For example, when you call Save() on Order object, the Order object will pass itself to DAL and DAL will need the CustomerID the Order belongs to so it can insert it into the database.

Should the Save() method of Customer only save the Customer or should it also save the orders for the customer along with the products for the customer?

Should the Load() method of CustomerCollection load all customers from the database or should it load the customers, their orders and the products which belong to the order?

Should the Load() method of CustomerCollection only get the ids of all the customers and then pass the id to Customer.Load(string id) so the customer can load itself from the database or should the CustomerCollection.Load() get all the customer records and create Customer object by calling its overloaded constructor or perhaps calling Customer.Load(f1, f2, f3, ...) and passing all the fields?

I assume there is no correct way and probably it is a matter of opinion but I just want to know which way is the best way. How do you guys do it and please do not suggest using ORM?
AnswerRe: Business Objects Pin
Jon Rista16-Jan-09 13:42
Jon Rista16-Jan-09 13:42 
GeneralRe: Business Objects Pin
CodingYoshi16-Jan-09 14:06
CodingYoshi16-Jan-09 14:06 
GeneralRe: Business Objects Pin
Jon Rista16-Jan-09 14:22
Jon Rista16-Jan-09 14:22 
GeneralRe: Business Objects Pin
Colin Angus Mackay16-Jan-09 15:17
Colin Angus Mackay16-Jan-09 15:17 
GeneralRe: Business Objects Pin
Jon Rista16-Jan-09 15:26
Jon Rista16-Jan-09 15:26 
GeneralRe: Business Objects Pin
N a v a n e e t h16-Jan-09 15:34
N a v a n e e t h16-Jan-09 15:34 
GeneralRe: Business Objects Pin
Jon Rista16-Jan-09 15:40
Jon Rista16-Jan-09 15:40 
GeneralRe: Business Objects Pin
CodingYoshi16-Jan-09 17:20
CodingYoshi16-Jan-09 17:20 
GeneralRe: Business Objects Pin
Jon Rista16-Jan-09 17:32
Jon Rista16-Jan-09 17:32 
GeneralRe: Business Objects Pin
CodingYoshi16-Jan-09 20:23
CodingYoshi16-Jan-09 20:23 
GeneralRe: Business Objects Pin
Jon Rista16-Jan-09 20:31
Jon Rista16-Jan-09 20:31 
GeneralDomain Driven Design Quickly - free ebook Pin
DaveyM6917-Jan-09 2:22
professionalDaveyM6917-Jan-09 2:22 
GeneralRe: Domain Driven Design Quickly - free ebook Pin
CodingYoshi17-Jan-09 13:17
CodingYoshi17-Jan-09 13:17 
AnswerRe: Business Objects Pin
Mark Graham26-Feb-09 23:43
Mark Graham26-Feb-09 23:43 
Questiondisplay data from a database in a label Pin
ferronrsmith16-Jan-09 10:21
ferronrsmith16-Jan-09 10:21 
AnswerRe: display data from a database in a label Pin
Alaric_16-Jan-09 10:25
professionalAlaric_16-Jan-09 10:25 
GeneralRe: display data from a database in a label Pin
ferronrsmith16-Jan-09 11:24
ferronrsmith16-Jan-09 11:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.