I’m sure you’re all tired of me blogging about L2S, but I still like it. It’s just so simple and easy to use. Obviously with .net 4.0, the big issues with L2S seem to be resolved. Alongside l2sprof, LINQ to SQL can be very effective. Anyhow, I thought I’d share a simple generic repository I made.
Here's how you'd use the repository.
Basically, you just pass in the DataContext you want to use and then call the method needed.
As usual, please let me know if you see any improvements that can be made or if you have any questions.
I’m sure you’re all tired of me blogging about L2S, but I still like it. It’s just so simple and easy to use. Obviously with .net 4.0, the big issues with L2S seem to be resolved. Alongside l2sprof, LINQ to SQL can be very effective. Anyhow, I thought I’d share a simple generic repository I made.
Here's how you'd use the repository.
Basically, you just pass in the DataContext you want to use and then call the method needed.
As usual, please let me know if you see any improvements that can be made or if you have any questions.