Read full article on Falafel blog
I have often seen developers use the LINQ SELECT statement to create a new instance of one class from an existing instance of another class. There are many scenarios when you may have to do this, for example:
- Creating the domain class instance from the entity class instance
- Creating the DTO class instance from the entity class instance
- Creating the POCO class instance from the entity class instance etc.
To do this, developers often use the select statement or manually convert a class object to another class object. Let’s look at an example:
Leave a Reply