public ActionResult Create(TbSePais collection) { if (!ModelState.IsValid) { return(View()); } TbSePais pais; var ids = User.Claims.FirstOrDefault(x => x.Type == ClaimTypes.NameIdentifier)?.Value; try { pais = PaisService.Create(collection); if (pais != null) { TbSeMensaje msj = new TbSeMensaje("Has creado un Pais"); // Email("Se creo un Pais", msj); this.IBitacoraMap.CrearBitacora(Convert.ToInt32(ids), "Creo un nuevo pais", pais.Id, "Pais"); } return(RedirectToAction(nameof(Index))); } catch { throw; } }
public PaisViewModel DomainToViewModelSingle(TbSePais domain) { return(new PaisViewModel { Id = domain.Id, GentilicioEn = domain.GentilicioEn, GentilicioEs = domain.GentilicioEs, Inactivo = domain.Inactivo, Iniciales = domain.Iniciales, NombreEn = domain.NombreEn, NombreEs = domain.NombreEs }); }
public PaisViewModel DomainToViewModelSingle(TbSePais domain) { throw new NotImplementedException(); }
public TbSePais UpdatePais(TbSePais domain) { return(repository.Update(domain)); }
public TbSePais Create(TbSePais collection) { return(repository.Save(collection)); }