Hello,
>>Is it possible to do a linq2sql join (only one trip to the database), and immediately create a strongly typed object (ie not anonymous ??)
No, we need to firstly define the DTO class as below:
class Program
{
static void Main(string[] args)
{
DFDBEntities db = new DFDBEntities();
var resutl = from order in db.Orders
select new OrderDTO { ID = order.OrderID };
}
}
class OrderDTO
{
public int ID { get; set; }
}
Regards.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.