Separating concerns with Linq To SQL and DTO's
问题 I recently started a new webforms project and decided to separate the business classes from any DBML references. My business layer classes instead access discrete Data layer methods and are returned collections of DTO's. So the data layer might project DTO's like the following: (from c in dataContext.Customers where c.Active == true select new DTO.Customer { CustomerID = c.CustomerID, Name = c.CustomerName, ... }).ToList() Although building the DTO objects adds work, this feels like a better