none
Inheritance for POCO objects RRS feed

  • Question

  • Given a scenario where I am creating a map program, I'm going to have several tables of different objects. For instance a table of road segments, a table of traffic signals, and so on for each type of object on the road. Each different object will have somethings that are in common (for instance latitude and longitude) and other things that are unique for instance a road segment has a length, while a traffic signal has a type (e.g. red/yellow/green, flashing red only, flashing yellow only).

    I generated entity objects from these tables. and it created a POCO object for each type. However, I would rather have a base class for their shared properties. Is there a way to specify these commonalities before generation? I'd like to maintain the ability to regenerate if needed.

    TIA,
    Nottoc

    Monday, April 4, 2016 1:57 PM

Answers