I have this on my Module
Module
and this on ControllerCode:public class Person { public int ID { get; set; } [Required] [StringLength(30)] public string First { get; set; } [Required] [StringLength(30)] public string Last { get; set; } public DateTime BirthDate { get; set; } } public class PersonContext : DbContext { public DbSet<Person> People { get; set; } }
Controller
Every type I click the Create link, I'm encountering this error:Code:// GET: /Person/Create public ActionResult Create(Person person) { db.People.Add(person); db.SaveChanges(); return RedirectToAction("Index"); }
Validation failed for one or more entities. See 'EntityValidationErrors' property for more details.


Reply With Quote

