public ActionResult Create(FormCollection collection) { try { // TODO: Add insert logic here ItemComponent itemComponent = new ItemComponent(); Item item = new Item(); item.porcentaje = int.Parse(collection.Get("porcentaje")); item.item = collection.Get("item"); item.Tipo.Id = int.Parse(collection.Get("Tipo.tipoItem")); itemComponent.Create(item); return(RedirectToAction("Index")); } catch (Exception e) { return(View()); } }