public ActionResult UploadContent(string folderPath, string libraryName, ContentModel inContent)
 {
     try
     {
         var output = new ContentModel() { Name = inContent.Name + ".aspx", Description = inContent.Description, LibraryName = libraryName, FolderPath = folderPath };
         var content = new Model.Entities.Content() { Name = output.Name, Description = output.Description, LibraryName = output.LibraryName, FolderPath = output.FolderPath };
         ContentService.UploadContent(content);
         return RedirectToAction("Content", "Home", new { LibraryName = inContent.LibraryName, Name = inContent.Name, FolderPath = ApplicationConfiguration.SpInsatance.Replace(ApplicationConfiguration.SharePointUri, "").StartWithSlash() + "Site Pages" });
     }
     catch (Exception ex) { throw ex; }
 }
 public ActionResult CreateContent(string libraryName, string folderPath)
 {
     try
     {
         ViewBag.UploadPath = folderPath;
         ViewBag.LibraryName = libraryName;
         var model = new ContentModel();
         model.FolderPath = folderPath;
         model.LibraryName = libraryName;
         return View(model);
     }
     catch (Exception ex) { throw ex; }
 }
        public ActionResult GetContent(string libraryName, string name, string folderPath)
        {
            try
            {                
                var model = ContentService.GetContent(libraryName, name, folderPath);
                var output = new ContentModel() { Name = model.Name, Description = model.Description, CreatedDate = model.CreatedDate, CreatedBy = model.CreatedBy, ModifiedDate = model.ModifiedDate };

                ViewBag.UploadPath = folderPath;
                ViewBag.LibraryName = libraryName;

                return View("ShowContent", output);
            }
            catch (Exception ex) { throw ex; }
        }
        public ActionResult Contents(string libraryName, string name, string folderPath, string sortField, string sortDir)
        {
            try
            {
                var contentModel = new ContentModel() { LibraryName = libraryName, Name = name, FolderPath = folderPath, SortDir = sortDir, SortField = sortField };
                var content = new Content() { LibraryName = contentModel.LibraryName, Name = contentModel.Name, FolderPath = contentModel.FolderPath, SortDir = contentModel.SortDir, SortField = contentModel.SortField };
                var documents = ContentService.GetAllContent(content);
                var output = documents.Select(model => new ContentModel() { Name = model.Name, Description = model.Description, CreatedDate = model.CreatedDate, CreatedBy = model.CreatedBy, ModifiedDate = model.ModifiedDate, ModifiedBy = model.ModifiedBy }).ToList();

                ViewBag.UploadPath = folderPath;
                ViewBag.LibraryName = libraryName;
                
                return View(output);
            }
            catch (Exception ex) { throw ex; }
        }