//Удалить комментарий
        public void Delete(CommentBindingModel model)
        {
            var element = _commentStorage.GetElement(new CommentBindingModel {
                Id = model.Id
            });

            if (element == null)
            {
                throw new Exception("Элемент не найден");
            }
            _commentStorage.Delete(model);
        }
Ejemplo n.º 2
0
 public async Task DeleteComment([FromRoute] Guid newsId, [FromRoute] Guid userId)
 {
     await _commentStorage.Delete(newsId, userId);
 }