To simplify things, we will be creating a model to pass to our controller:
- Create a new class in the Models folder of your application called LoginModel and click on the Add button:
- Your project should now look as follows. You will see the model added to the Models folder:
- The next thing we want to do is add some code to our model to represent the fields on our login form. Add two properties called Email and Password:
namespace CoreMailValidation.Models { public class LoginModel { public string Email { get; set; } public ...