Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Saving data
Message
From
12/12/2012 08:40:26
 
General information
Forum:
ASP.NET
Category:
MVC
Title:
Environment versions
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01559354
Message ID:
01559408
Views:
55
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
Previous
Reply
Map
View

Click here to load this message in the networking platform