Click here to Skip to main content
15,867,308 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am a newbie to POCO.I have two tables like tb1 and tb2.Suppose we have a PK and FK relation between these tables.When it come to POCO CF how can we manage this relations?I have a done a sample by following a article.
C#
public abstract class Person
   {
       public string Name { get; set; }
       public int DepartmentId { get; set; }
       public virtual Department Department { get; set; }
   }

   public class Collaborator : Person
   {
       public int CollaboratorId { get; set; }
       public string ManagerCode { get; set; }
       public virtual Manager Manager { get; set; }
   }


Why they have used the abstract and virtual keywords? Can any one explain me the how can we manage the relations?
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900