public IActionResult GetByBook([Required] string bookId) { var currentBooks = _provider.Get(new RateFilterByBookId { BookId = bookId }); return(new ObjectResult(currentBooks)); }
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()); }