Пример #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
         }));
     }
 }
Пример #2
0
 public StoryModel GetStory(int id)
 {
     return(_storyService.Get(id));
 }
Пример #3
0
        void TestStoryGetBusiness()
        {
            var modelOfStory = _storyService.Get(storyFilePath);

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

            return Ok(story);
        }
Пример #5
0
 public StoryModel Get(int id)
 {
     _currentStory = _storyService.Get(id);
     return(_currentStory);
 }