public void SetPreviewImageSession(int id) { var foto = this.GetElementById(id); var sesion = _serviceSesion.GetElementById(foto.IdSesion); sesion.IdFotoPreview = id; _serviceSesion.UpdateElement(sesion); }
public IActionResult Edit(int id) { try { var model = _serviceSesion.GetElementById(id); var vmo = SesionAdapter.Convert(model); vmo.StateView = Models.Enum.StateViewEnum.Edicion; vmo.Apartados = _serviceApartado.GetElements().Select(x => new SelectListItem() { Text = x.Nombre, Value = x.Id.ToString() }); return(PartialView("_ModalSesion", vmo)); } catch (Exception ex) { throw ex; } }