//TODO: add checks on null!!!
 public ActionResult ApplyFilter(String filter, int pictureId)
 {
     var type = (FilterType)Enum.Parse(typeof (FilterType), filter);
     var photo = unitOfWork.PictureRepository.ReadById(pictureId);
     photo.Filter = type;
     SaveFilteredImage(photo.FileName, type);
     var viewModel = new PhotoViewModel() {Picture = photo};
     unitOfWork.Save();
     return Content(viewModel.FilePath);
 }
 public ActionResult Show(int id)
 {
     var photo = new PhotoViewModel() {Picture = unitOfWork.PictureRepository.ReadById(id)};
     ViewBag.Disabled = !Request.IsAuthenticated ? "disabled" : "";
     return View("SinglePhoto", photo);
 }