Example #1
0
        public ActionResult PreencherDados(Buraco buraco)
        {
            db.Buraco.Add(buraco);
            db.SaveChanges();

            return(View("Index"));
        }
Example #2
0
        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));
        }