public ActionResult Create(FormCollection collection) { try { // TODO: Add insert logic here Medico med = new Medico { Med_Nome = collection.GetValue("Med_Nome").AttemptedValue.ToString(), Med_Email = collection.GetValue("Med_Email").AttemptedValue.ToString(), Med_Telefones = collection.GetValue("Med_Telefones").AttemptedValue.ToString(), Med_Obs = collection.GetValue("Med_Obs").AttemptedValue.ToString() }; try { med.Gravar(); return(RedirectToAction("Index")); } catch (Exception ex) { throw; } } catch { return(View()); } }