DevConnections – Building a LINQ Based Business Layer for ASP.NET Apps
This talk was given by Rick Strahl.
This talk was very upsetting. There was a person asking entry level LINQ questions though out the whole thing… and yes this is the same person as in the other sessions. I don’t know how I ended up choosing the same ones as him. Rick kept answering his questions, and in the 1.5 hour session, got to the actual topic in the last 5 minutes. I was really disappointed, ’cause this was one session I was really looking forward to.
Basically, how this is done is you would create business objects and pass up a type that can be queried using LINQ. You can pass a type from the LINQ to SQL data context, limiting it to a specific object/table. This way a consumer can still run a LINQ query on the object, and the query will be optimized and not ran until needed, just like if you were using the data context directly. You can then create all the business rules you want around these objects.
One of these days I’ll write up some examples of how this would work and post them.