我正在尝试在下面的模型下添加一个跟随Login控制器的视图。但是在scafolding期间,我会在屏幕截图中看到错误。我怎么解决呢?我在做什么错了?有什么想法吗?
控制器:
[HttpGet]
public ActionResult Login()
{
return View();
}
错误图片:
型号:
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
namespace Test.Models
{
public class UserLogin
{
[Display(Name = "Email ID")]
[Required(AllowEmptyStrings = false, ErrorMessage = "Email ID required")]
public string Email { get; set; }
[Required(AllowEmptyStrings = false, ErrorMessage = "Email ID required")]
[DataType(DataType.Password)]
public string Password { get; set; }
[Display(Name = "Remember Me")]
public bool RememberMe { get; set; }
}
}