/// <summary>
 /// Adds a new view.
 /// </summary>
 /// <param name="content">
 /// The content.
 /// </param>
 /// <returns>
 /// The <see cref="HttpResponseMessage"/>.
 /// </returns>
 public PluginViewEditorContent AddNewView(PluginViewEditorContent content)
 {
     try
     {
         return _provider.CreateNewView(content.FileName, content.PluginViewType, content.ModelTypeName, content.ViewBody);
     }
     catch (Exception ex)
     {
         MultiLogHelper.Error<PluginViewEditorApiController>("View creation failed", ex, _logData);
         throw;
     }
 }
        /// <summary>
        /// Saves the view.
        /// </summary>
        /// <param name="content">
        /// The content.
        /// </param>
        /// <returns>
        /// The <see cref="PluginViewEditorContent"/>.
        /// </returns>
        public PluginViewEditorContent SaveView(PluginViewEditorContent content)
        {
            if (_provider.SaveView(content.FileName, content.PluginViewType, content.ViewBody))
            {
                return content;
            }

            var ex = new MerchelloApiException("Failed to save view");
            MultiLogHelper.Error<PluginViewEditorApiController>("View save failed", ex, _logData);
            throw ex;
        }