public void SaveImage(ImageUnload image) { Racoonogram.Models.Image imEdit = GetImage(image.Id); imEdit.Category = image.Category.ToLower(); imEdit.KeyWords = image.KeyWords.ToLower(); if (!String.IsNullOrEmpty(image.Description)) { imEdit.Description = image.Description.Substring(0, 1).ToUpper() + image.Description.Substring(1); } if (!String.IsNullOrEmpty(image.Colors)) { imEdit.Colors = image.Colors.ToLower(); } imEdit.Price = image.Price; db.SaveChanges(); }
public ActionResult SaveImageChanges(ImageUnload image) { new ImageService().SaveImage(image); return(RedirectToAction("Index")); }