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.

Data tab

M# allows you to populate the database without opening SQL Server Management Studio.
You can access to the Data tab from your M# entity definition, by clicking on the "Data & Tests" tab.
This interface allows you to benefit from your custom validation rules and manage persisted data for both your World and Test database.

Add data

To add data, simply click on the "Add" button, populate the form displayed on the right part of the window and save it.
Before being saved, your new object will pass the entity validation and your business validation rules to ensure data integrity.

Edit data

For editing data, you can either click on the "Edit" link next to each row or select all the rows you want to edit and then click on the top menu's "Edit" button.
As for adding data, your new updated object will have to be validated by the entity validation and your business rules.

Delete data

For deleting data, select your items and then click on "Delete" button.

Validation

Like for editing or deleting records, select which record/s you want to validate and click on the "Validate" button:

By doing this you will make sure that all your records are validated by your current custom validation logic. This feature is very useful if you create new rules on existing data.

Unit testing

If you plan to create unit tests in your project, M# will use this data to populate the unit test database, so you never have to manage two different set of records.
Data in your World database is exactly the same as data in your Unit Test database.
If you change data after creating your unit tests, make sure all your tests are still passing.