public ActionResult Rotate(RotateViewModel rotateViewModel)
        {
            if (ModelState.IsValid)
            {
                try
                {
                    _imageManager.Rotate(rotateViewModel.ImageId, rotateViewModel.RotateType);
                }
                catch (Exception ex)
                {
                    var logEntry = CreateLogEntry("Rotate Image Error", LogOperations.ImageRotate, ex);
                    Logger.Error(logEntry);
                }
            }

            return RedirectToAction(nameof(MediaBankController.Images), MvcHelper.ControllerName<MediaBankController>(), new { mediaBankViewMode = MediaBankViewModes.Full, id = rotateViewModel.ImageId });
        }
Example #2
0
 public static RotateViewModel ToRight(Guid imageId)
 {
     var result = new RotateViewModel(imageId, RotateTypes.Right);
     return result;
 }