public ActionResult PreencherDados(Buraco buraco) { db.Buraco.Add(buraco); db.SaveChanges(); return(View("Index")); }
public ActionResult Upload(HttpPostedFileBase file) { if (file != null) { file.SaveAs(HttpContext.Server.MapPath("~/Upload/") + file.FileName); } var buraco = new Buraco(); buraco.UriFoto = file.FileName; return(View("PreencherDados", buraco)); }