Overlapping implementation using composition

133 views Asked by At

I would like to implement overlapping. Substitute for overlapping is composition? enter image description here

enter image description here

I do this project in asp.net mvc using Entity Framwework(Code First). Any ideas how to do it?

Person.cs

 public abstract class Person
    {
        public int PersonId { get; set; }
        public string FirstName { get; set; }

        public string LastName { get; set; }

        public string Email { get; set; }

        public virtual ICollection<User> users { get; set; }

    }

User.cs

 public class User : Person
    {
        private Boolean Pelnoletni{get; set;}
        private string Adres{get; set;}
        private long Telefon_kontaktowy{get; set;}

        public virtual ICollection<Order> orders {get; set;}
        public virtual ICollection<Opinion> opinions { get; set; }

    }

Seller.cs

   public class User : Person
    {
        private Boolean Adult{get; set;}
        private string Adress{get; set;}
        private long Phone_number{get; set;}

        public virtual ICollection<Order> orders {get; set;}
        public virtual ICollection<Opinion> opinions { get; set; }

    }
0

There are 0 answers