>With a web app, you don't have state, so you should always commit. Passing a bool as a parameter is considered bad form. That class doesn't smell right to me. A class should have one function only. This one does multiple things. It's mixing context and repository. There should be multiple classes doing one thing. I'll have to work up a simple example and then post it.
>
This is actually a simulation of what we learned with the instructor. In the application we built together we had Application.Data project with the _IRepository interface and Repository class to have DbContext. The methods also very closely resemble what we learned.
Also, the idea is to be able to use Objects and Data projects independently, in desktop application, if needed.
So, we don't create models in the Models folder, but create them separately in the separate project (Application.Objects).
If it's not broken, fix it until it is.
My Blog