Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use LINQ generated classes directly?

LINQ will generate a set of classes from the SQL files. Should these be used directly, or should they be wrapped in another class so the model is not so dependent on the implementation?

like image 957
jessicar Avatar asked Jun 01 '26 14:06

jessicar


1 Answers

You can do it either way. Generally I wrap the Linq to SQL classes in a repository, but if the app is small you can use the repository methods directly.

If the app is larger you can add a business layer.

like image 113
Robert Harvey Avatar answered Jun 03 '26 17:06

Robert Harvey