Apologies if this was already asked but, I have had a look and can't find anything. I am trying to work out the best way to model the following in C#. I have sketched out a few idea but none of them feel right.
I have created an abstract 'Person' class. My application will have Clients and Employees. Obviously, A Client is a Person An Employee is a Person
- An Employee does not have to be a client.
- A Client can become an Employee even if they were not initially set up as one.
- An Employee can become a client
- An Person can stop being an Employee but remain a Client
- A Person can stop being a Client but remain an Employee
Ultimately, I will want to map this using Fluent NHibernate. I keep thinking that this should be easy and I just not thinking straight but is there a pattern that I can use that would solve this problem.
Thanks.