Add another class “Student Meta Data” in the same cs file and add the following properties. The Meta Data Type attribute is present in Systrem. Run the application and do the same step again using Fiddler.
Ensure the property name in the Student Custom Data class must match the property name of the properties present in the auto-generated Student class.
Select an Empty template and choose View engine as Razor. Choose the Model Contents as EF Designer from the database and click Next. Specify the server name then select the authentication mode then choose the database then click Ok. Drag and drop that generated request in the composer window and change the Student Name from James to LOL.
We don't want our entities to be called tbl Course and tbl Student. Step 4 The next step is to add a controller and for that right-click on the Controllers folder then select Add then select Controller. Select the template “MVC Controller with read/write actions and views using Entity Framework”Select Student as the model class. Like Home Controller, Index, Details, Create, Edit and Delete.cshtml files. So, if we click on the create link, we will get this layout and this layout is nothing but a Create scaffold template. Let's see what happens if we don't insert any data into the fields and click the create button. So, to prevent the fields from having blank records we can make all the properties required. So, let's see how to change this validation message. In the Edit view, we don't want the Student Name to be editable. We got a validation error in the Name field because this Student Name field is a read-only field but we are not posting the value back to the server and when we click the Save button this field becomes null. Look at how the Edit post action method is implemented. To delete a record click the Delete link in the Index page. So, in this article we saw how to Insert, Update and Delete records and with that we have also seen how to prevent un-intended updates.