public IActionResult UploadImage(int id) { UploadCategoryImageViewModel model = new UploadCategoryImageViewModel(); model.CategoryId = id; model.CategoryName = service.Category(id).CategoryName; model.ImageDataUrl = service.GetCategoryImageAsDataUrl(id); model.UploadFileName = string.Empty; return(View(model)); }