public ActionResult Edit(Guid id, Employer e) { try { // TODO: Add update logic here e.EmployerUpdate(id); return(RedirectToAction("Details")); } catch { return(View(e)); } }
public ActionResult Edit(Guid id, Employer e) { try { if (e.UploadedImageFile != null) { using (MemoryStream ms = new MemoryStream()) { e.UploadedImageFile.InputStream.CopyTo(ms); e.ProfilePicture = ms.GetBuffer(); ms.Close(); } } e.EmployerUpdate(id); return(RedirectToAction("Details/" + id)); } catch { return(View(e)); } }