I have a problem when submitting the form for a new creation, the problem that I can not validate the data of variable dbgeometry .. the error message is "No constructor without parameter defined for this object." this is my code controller :
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult Create([Bind(Include = "id,name,Location")] schoolinfo schoolinfo)
{
if (ModelState.IsValid)
{
db.schoolinfo.Add(schoolinfo);
db.SaveChanges();
return RedirectToAction("Index");
}
return View(schoolinfo);
}
my model from EF :
public partial class schoolinfo
{
public string id { get; set; }
public string name { get; set; }
public System.Data.Entity.Spatial.DbGeography Location { get; set; }
}