I already have an existing model and I modified them. But when I edit and save the diagram, MVC
regenerates the model and deletes my modifications. I don't want that, how to disable this function?
[RegularExpression("([1-9][0-9]*)",ErrorMessage = "Count must be a natural number")] <-- This line has been deleted
public Nullable<decimal> PsNo { get; set; }
You don't need this. Use ViewModels instead of the actual models and do all the modification on them. This way you can enjoy synced models and keep modification at the same time.