Validations using entity framework data annotation in .Net core MVC

 In previous article we have learnt about working with Drop down in .Net Core MVC . now in this article we will work with the validations using entity framework data annotation. To implement the validation we just need to write minimal code and you are done, you do not need to write extra code for handling validation of your form.  Lets start the implementation, I am going to use the same application for this implementation which i have used in previous article mentioned above. We will use below validation types in this article however there are more validation types available in entity framework data annotation (like Range validation,compare validation,Custom Validation and more)  . Required validation Regular Expression validation String Length validation Max Length validation  First we need to import " _ValidationScriptsPartial " partial class in our view where we need to implement the validation using below syntax. @Html.Partial("_ValidationScriptsPartial")

Working with Drop Down control in .Net Core MVC with steps

In previous articles we have learned about code first approach , Entity migration, crud operation in MVC .NET core, in this article i am going to demonstrate about work with drop down control in .NET Core MVC application with JQuery drop down binding. I am going to use the same application which i have used in crud operation article. So lets start the implementation.       First we need to create the City and State models for that add below classes in ModelExample project.  CityMaster.cs using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using System.Text; namespace ModelsExample { [Table("CityMaster")] public class CityMaster { [Key] [Column("Id")] public int Id { get; set; } [Column("Name")] public string Name { get; set; } [Column(" StateMasterId ")] public int StateM

Deploy .NET Core MVC Application on Azure Cloud

In this article I will be explaining about deploying .NET Core MVC Application on Azure Cloud step by step in detail.  There are following deployment stages involved  1) Signup in Azure 2) Creating a Resource Group 3) Creating a VM 4) Creating a Azure sql server Database 5) Publish your MVC Application 6) install IIS web server feature in VM 7) deploy your publish files in IIS       Lets discuss each steps in detail.   1) Signup in Azure  You can signup to azure using below link you will get 1 month free trial for using azure services.   once you signup with azure, you are ready to do the next steps in the article. 2) Creating a Resource Group login to azure portal where you can get links to use various services and home page look like below figure.   In above portal you can type "resource group" in search bar you can create the Resource Group. type the resource group name and select the desired region and click on review +create butt