M# Tutorials

Learn to build .NET applications with M#. Our step-by-step tutorials will get you up-to-speed rapidly.
If you already know ASP.NET and C#, you can master M# in a week or two.

Entity Level Custom Validation Rule

This tutorial explains the best practise to perform any custom server side validation on an entity instance. M# encourages performing any server side validation in one method “Validate” which must be overridden in entity type’s logic class. As a good practice, you should write complex validation code in separate meaningful methods and those methods should then be called in the Validate Method.

The code below shows custom validation of an “Employee” entity instance