Exemple #1
0
 public async Task <ActionResult> GetAll()
 {
     try
     {
         var result = storyService.Get(q => q.Active == true).ToList();
         return(Ok(new { data = result }));
     }
     catch (Exception e)
     {
         return(BadRequest(new
         {
             data = new
             {
                 title = "Error",
                 Msg = "Fail to load organization list!"
             },
             Success = false
         }));
     }
 }
 public StoryModel GetStory(int id)
 {
     return(_storyService.Get(id));
 }
        void TestStoryGetBusiness()
        {
            var modelOfStory = _storyService.Get(storyFilePath);

            Assert.NotNull(modelOfStory);
        }
Exemple #4
0
        public IActionResult GetById([FromRoute] int id)
        {
            var story = _storyService.Get(id);

            return Ok(story);
        }
Exemple #5
0
 public StoryModel Get(int id)
 {
     _currentStory = _storyService.Get(id);
     return(_currentStory);
 }