public IActionResult ProfilEdit() { int Id = Convert.ToInt32(HttpContext.Session.GetString("loginid")); var result = _ogrenciservice.GetById(Id); if (result.Success) { ProfilEditViewModel entitys = new ProfilEditViewModel(); entitys = _mapper.Map <ProfilEditViewModel>(result.Data); return(View(entitys)); } return(null); }
public IActionResult ProfilEdit(ProfilEditViewModel model) { try { Ogrenci entity = new Ogrenci(); entity = _mapper.Map <Ogrenci>(model); _ogrenciservice.Update(entity, 1); return(RedirectToAction("Index", "KitapAl")); } catch (Exception) { return(null); } }
public ProfilEditPage() { InitializeComponent(); BindingContext = new ProfilEditViewModel(); }