Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Saving data
Message
De
12/12/2012 08:40:26
 
Information générale
Forum:
ASP.NET
Catégorie:
MVC
Titre:
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01559354
Message ID:
01559408
Vues:
54
Thanks. That's pretty much what I do. In fact, I have some business rules validation to wire up today. Your method gives me some things to think about when I write the code.

>Yes and no. Modelbinding validation only takes you so far. If you have dynamic rules then model based validation falls apart.
>
>I do use the validation attributes on the entity model, but only for basic stuff like empty values, ranges etc.. Ultimately, I want validation logic in my business object that can check it all. My business layer looks at validation errors that are internally assigned (via an OnValidate() method that allow for easy coded rules) or those that are fired via validation errors on the entity model when the model is saved by EF, so it works either way.
>
>Modelbinding by itself is not enough IMHO...
>
>+++ Rick ---
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform