示例#1
0
        public IActionResult GetByBook([Required] string bookId)
        {
            var currentBooks = _provider.Get(new RateFilterByBookId {
                BookId = bookId
            });

            return(new ObjectResult(currentBooks));
        }
示例#2
0
 public IActionResult Delete([Required] string id)
 {
     foreach (var c in _commentProvider.Get(new CommentFilter {
         CommentedEssenceId = id
     }))
     {
         _commentDataWriter.Remove(c.Id);
     }
     foreach (var r in _rateProvider.Get(new RateFilterByBookId {
         BookId = id
     }))
     {
         _rateDataWriter.Remove(r.Id);
     }
     _dataWriter.Remove(id);
     return(Ok());
 }