Click here to Skip to main content
16,008,469 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
GeneralRe: Composed Business Objects Pin
led mike31-Oct-07 4:56
led mike31-Oct-07 4:56 
GeneralRe: Composed Business Objects Pin
Pawel Krakowiak31-Oct-07 5:08
Pawel Krakowiak31-Oct-07 5:08 
GeneralRe: Composed Business Objects Pin
led mike31-Oct-07 5:36
led mike31-Oct-07 5:36 
GeneralRe: Composed Business Objects Pin
Pawel Krakowiak31-Oct-07 7:54
Pawel Krakowiak31-Oct-07 7:54 
GeneralRe: Composed Business Objects Pin
Mark Churchill31-Oct-07 18:09
Mark Churchill31-Oct-07 18:09 
GeneralRe: Composed Business Objects Pin
Pawel Krakowiak1-Nov-07 4:16
Pawel Krakowiak1-Nov-07 4:16 
GeneralRe: Composed Business Objects Pin
Mark Churchill1-Nov-07 16:20
Mark Churchill1-Nov-07 16:20 
GeneralRe: Composed Business Objects Pin
Pawel Krakowiak1-Nov-07 23:41
Pawel Krakowiak1-Nov-07 23:41 
So, you suggest to have an accessor like this:

<code>private int _ownerId; // This is initialized elsewhere.

public User Owner
{
   get
   {
      // Lazy loads the User object upon request by using the UserManager class'
      // static method.
      return UserManager.GetUserById(_ownerId);
   }
   set
   {
      // Cast value to User object and retrieve it's ID.
      _ownerId = ((User)value).UserId;
   }
}</code>


User = Person, I currently have that class named User, although it conflicts with a class from .NET Framework sometimes, so renaming it to Person is a good idea.

This is a simplified example, but something like the above? This would allow to bind easily the property in ASP.NET, like "User.Owner.FullName", but still wouldn't endlessly load objects, right?

BTW. Is DiamondBinding an ORM? I have currently a license for EntitySpaces[^], but am not using it at the moment. The way how ORMs present the objects looks like more fitting for the DAL rather than BLL... But this is an another discussion. Wink | ;)

Kind regards,
Pawel Krakowiak

GeneralRe: Composed Business Objects Pin
Mark Churchill2-Nov-07 1:50
Mark Churchill2-Nov-07 1:50 
GeneralRe: Composed Business Objects Pin
Pawel Krakowiak2-Nov-07 2:01
Pawel Krakowiak2-Nov-07 2:01 
GeneralRe: Composed Business Objects Pin
Mark Churchill2-Nov-07 2:57
Mark Churchill2-Nov-07 2:57 
GeneralRe: Composed Business Objects Pin
martin_hughes2-Nov-07 7:44
martin_hughes2-Nov-07 7:44 
GeneralRe: Composed Business Objects Pin
Mark Churchill2-Nov-07 16:39
Mark Churchill2-Nov-07 16:39 
GeneralRe: Composed Business Objects Pin
Pawel Krakowiak2-Nov-07 10:55
Pawel Krakowiak2-Nov-07 10:55 
GeneralRe: Composed Business Objects Pin
Mark Churchill2-Nov-07 16:24
Mark Churchill2-Nov-07 16:24 
GeneralSuggestions: File Layout Editor Pin
Brady Kelly28-Oct-07 22:45
Brady Kelly28-Oct-07 22:45 
QuestionInformation on .Net Architecture positions Pin
M LN Rao22-Oct-07 22:24
M LN Rao22-Oct-07 22:24 
AnswerRe: Information on .Net Architecture positions Pin
led mike23-Oct-07 9:19
led mike23-Oct-07 9:19 
AnswerRe: Information on .Net Architecture positions Pin
dojohansen29-Oct-07 1:12
dojohansen29-Oct-07 1:12 
QuestionApplication implementations level Add/Removing Controls Pin
prit_mahudha19-Oct-07 18:30
prit_mahudha19-Oct-07 18:30 
AnswerRe: Application implementations level Add/Removing Controls Pin
garyshort20-Oct-07 8:12
garyshort20-Oct-07 8:12 
GeneralRe: Application implementations level Add/Removing Controls Pin
prit_mahudha21-Oct-07 18:21
prit_mahudha21-Oct-07 18:21 
GeneralRe: Application implementations level Add/Removing Controls Pin
garyshort21-Oct-07 22:00
garyshort21-Oct-07 22:00 
GeneralRe: Application implementations level Add/Removing Controls Pin
prit_mahudha21-Oct-07 22:37
prit_mahudha21-Oct-07 22:37 
GeneralRe: Application implementations level Add/Removing Controls Pin
garyshort21-Oct-07 23:31
garyshort21-Oct-07 23:31 

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.