Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
New exception?
Message
 
 
À
03/10/2012 15:59:24
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01554234
Message ID:
01554256
Vues:
44
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform