I am building two C# three-tier applications that get their data a very old database Customer table that has about 100 columns. They perform some logic in the business layer and a presentation layer displays the data.
The layout of the customer table is -
CustomerID
Firstname
Lastname
DateOfBirth
Othervalue1
Othervalue2
Othervalue3
.
.
Othervalue95
Creationdate
Updatedate
For these two applications I only need the customer table, but I am building the a new data access layer with Entity Framework. Future projects will need access to other tables and will add to this access layer.
I will use the Unit of work and repository patters.
My problem is the following -
Application A needs one subset of the customer table columns
and
Application B needs a different subset of the customer table columns (there is some overlap with Application A's needs)
How do I perform mapping from the data layer to these two independent business layers? I know I can use automapper to perform mapping from an data entity class to a business layer class, but I will have two different business layer Customer classes.
I have been reading a bit about DTO's but I don't see where there should go in this n-tiered application.