public void AutoSave(StoryInputModel inputModel)
 {
     if (String.IsNullOrEmpty(inputModel.Title) && String.IsNullOrEmpty(inputModel.Synopsis) && String.IsNullOrEmpty(inputModel.StoryContent))
     {
         return;
     }
     var tempStory = new StoryAutoSave
     {
         Content = inputModel.StoryContent,
         Title = inputModel.Title,
         DraftDate = DateTime.Now,
         Synopsis = inputModel.Synopsis,
         UserId = CurrentUser.Id
     };
     _storyService.SaveAutoSave(tempStory);
 }
        public BaseViewModel SaveStory(StoryInputModel inputModel)
        {
            if (!inputModel.Genre.HasValue)
                inputModel.Genre = Genre.ShortStory;
            var content = inputModel.StoryContent;
            var vm = new BaseViewModel();
            var story = _storyService.GetStoryByID(inputModel.StoryID) ?? new Story
                                                                              {
                                                                                  Title = inputModel.Title,
                                                                                  Synopsis = inputModel.Synopsis,
                                                                                  PublishStatus = inputModel.PublishStatus,
                                                                                  Genre = (Genre)inputModel.Genre,
                                                                                  UserAuthor = CurrentUser

                                                                              };
            var storyContent = story.StoryContent ?? new StoryContent();
            storyContent.Content = content;
            story.StoryContent = storyContent;
            if (story.DatePublished == null)
                story.DatePublished = DateTime.UtcNow;
            if (story.DateCreated == null)
                story.DateCreated = DateTime.UtcNow;
            try
            {
                _storyService.SaveStory(story);
                vm.Success = true;
            }
            catch (Exception e)
            {
                vm.Success = false;
                vm.Message = e.Message;
            }
            return vm;
        }