I'm building an application that takes data from an existing table, and then splits it into multiple entities, that follow specific trends. It is for a letting agent that manages multiple different agencies. One such shared entity that I have identified is the Address, shared by Landlord, Letting Agent and the actual property all of which share the properties below:
public class Address
{
public string HouseNumber
public string FlatPosition
public string AddressLine
public string Town
public string County
public string Postcode
}
In the giant table, they follow the above schema, but are specified with the relevant noun in front e.g. "LandlordHouseNumber etc., PropertyHouseNumber etc., LettingAgentHouseNumber etc.,"
Is it possible to take the data from the table, and instantiate with the address class whilst being able to distinguish the entity they represent? Or will I need to have an address class for each?
EDIT: