public IActionResult Guardar(AgentTypeModel model) { try { var data = CopyPropierties.Convert <AgentTypeModel, AgentType>(model); _agentType.Save(data); } catch (Exception e) { return(View("Index", _agentType.GetAll)); } return(View("Index", _agentType.GetAll)); }
public IActionResult Crear(AgentTypeModel model) { ViewBag.Status = new SelectList(_status.Status, "StatusId", "StatusName"); return(View(model)); }