linq to sql - Do you put Linq2SQL queries all over the place or in dedicated DAL classes? -


I've always included my Linq2SQL questions in almost all classes at my place.

I know what your strategy is about to keep your Linq2SQL query?

Do you put them in separate thana classes or do you store them where they use everywhere?

I think that I would have to change my strategy for the Linq2SQL query and store in different datelare classes I think it is necessary if I do TDD efficiently and comply with dependency injection and concrete principles. I am fully able to wrap all my Linux code in single DAL. I do not use the firmware on my website and business layer, in this way, if LinqToSql really dies or if I decide that I want to use a whole new framework then I will call all the DB calls There is no need to hunt. I

It also helps with reusability. I can use the same business or DAL in other projects which use the same database.


Comments