I have an existing domain layer. I want to develop the persistence layer using Linq to SQL. I am currently using an external map file. I am trying to use lazy loading for my child collections but am unsuccessful. Is there a way to implement lazy loading using Linq to SQL but without using EntitySet or EntityRef.
Asked
Active
Viewed 430 times
2
-
You should rephrase your title and content from "ignorance" to "agnostic" – Andrei Rînea May 25 '09 at 22:18
2 Answers
1
I can't guarantee that I'm up to the latest development of LTS, but previously you had to you use EntitySet/EntityRef to get lazy loading.
You're best bet is NHibernate if you want a PI-model.

Rune Sundling
- 592
- 3
- 8
0
(Not really answering the question.)
Entity Framework (aka. LINQ to Entities) in .NET 4 includes persistence ignorance support e.g. being able to map to POCO (Plain Old CLR Object1). See "Sneak Preview: Persistence Ignorance and POCO in Entity Framework 4.0 ".
1 I.e. Not requiring a base class or attributes.

Richard
- 106,783
- 21
- 203
- 265
-
For info, LINQ-to-SQL supported this (and both lazy and eager loading) in the initial release ;-p – Marc Gravell May 25 '09 at 09:03