Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
EF attributes that can only be changed from code
Message
 
 
À
03/04/2013 15:46:32
Information générale
Forum:
ASP.NET
Catégorie:
MVC
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01569983
Message ID:
01569985
Vues:
37
>The way around this is to create a second model that has only the fields you want to update. In fact, that's probably best practice as you only query the data you really need.
>

Is it the only way? Say, I still want to be able to change ModifiedOn, ModifiedBy if I am editing and the first two if I am inserting.

In other words, I may want to set ReadOnly attribute but conditionally.
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