.DBML file and LINQ to SQL

In my DBML file, I mapped some tables and stored procedures and the return type of the stored procedures is ISingleResult. T - some displayed table. But I want to take the data into my own created objects, not LINQ to SQL created by entites. The entites I created also match the mapped table entities and their usage lies when we submit data via a web service. So how can I proceed by creating a wrapper around the DBML file so that I always get the data for my own created targets.

+2


a source to share


1 answer


Entity Framework is designed for this scenario, but if you can't get to it for other reasons, Automapper is worth looking into.



You can add attributes to linq objects in sql that do not map to database columns by adding a property in the constructor and leaving the datasource property empty.

0


a source







All Articles