PC Review


Reply
Thread Tools Rate Thread

assign responsibility

 
 
Marty M
Guest
Posts: n/a
 
      20th Feb 2004
public abstract class Animal
{
private string Id;
}

public class Dog : Animal
{
//properties/fields for Dog
public void Add()
{logic to persist to database}

}

We'd like Dog to persist himself to database. We'd like classes
derived from Animal to always have a GUID in Id. But derived classes
should not worry about that, they don't have to know about the Id.
How do we do this while making Dog responsible to add himself? We
don't want to use Animal constructor because Id is only used for
Insert. Ideas? thanks! Marty
 
Reply With Quote
 
 
 
 
Cor
Guest
Posts: n/a
 
      20th Feb 2004
Hi Marty,

Please stay in the same thread and do not message twice, I saw Peter did
answer your previous question but for the same someone else had started to
evaluate your question again.

Cor


 
Reply With Quote
 
Marty McDonald
Guest
Posts: n/a
 
      20th Feb 2004
That is my mistake, I apologize. I posted from work, did not see my post in
the group and thought that the post did not work properly. So I posted
again at home. I should let some time pass before I assume there was a
problem with the original post. Thanks for the reminder!

"Cor" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi Marty,
>
> Please stay in the same thread and do not message twice, I saw Peter did
> answer your previous question but for the same someone else had started to
> evaluate your question again.
>
> Cor
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Responsibility for Drivers husky86 Windows Vista General Discussion 6 30th Mar 2008 09:03 PM
Spyware or Virus & Responsibility? Adelphia Security and Anti-Spyware Community 4 23rd Aug 2005 03:26 PM
How to assign responsibility? Marty McDonald Microsoft Dot NET 3 23rd Feb 2004 12:45 AM
chain of responsibility Jamie Microsoft Dot NET Framework Forms 1 23rd Oct 2003 11:43 AM
Responsibility of ISP? DK Anti-Virus 6 7th Sep 2003 10:52 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:52 PM.