Hello, I am designing a web application in c# that mostly talks with the database. I have created a DTO for each table in the database. Now for each Table there is a custom table repository class that does all the saving and fetching pertaining to that particular table, and I'm using stored procedures for that.
The issue is now some stored procedures will actually do a inner join operation and then send a custom output which is a combination of 2 tables.
Therefore I'm not able to store the data in a single DTO object.
If there are any basic operations which are mostly done on a single table then things are fine.. I can call the table dto object for both inserts and fetching from the database. But when joins are there in stored procedures and during certain situations we update multiple tables.
How should we design the app?
Please Help
Thanks