public ActionResult Create(Empleado model) { try { empleadoRepository = new EmpleadoRepository(); model.Id = DateTime.Now.Ticks.ToString(); empleadoRepository.GuardarEmpleado(model); return(RedirectToAction("Index")); } catch { return(View(model)); } }
public ActionResult Create(Empleado model) { try { empleadoRepository = new EmpleadoRepository(); model.Id = DateTime.Now.Ticks.ToString(); empleadoRepository.GuardarEmpleado(model); return RedirectToAction("Index"); } catch { return View(model); } }