public ActionResult Create(string Author, string Tittle, string imagebase64, HttpPostedFileBase file) { try { SketchModel model = new SketchModel(); //sets date model.Author = Author; model.Tittle = Tittle; model.Image = imagebase64; model.Created = model.Changed = DateTime.Now; service.Add(model); return RedirectToAction("Index"); } catch { return View(); } }
public ActionResult Edit(int id, FormCollection collection) { try { // TODO: Add update logic here SketchModel model = new SketchModel(); service.Update(model); return RedirectToAction("Index"); } catch { return View(); } }