Exemple #1
0
        public async Task <IActionResult> Delete(int id)
        {
            try
            {
                if (id > 0)
                {
                    await _repository.BlockAsync(id);

                    return(Ok());
                }
                throw new ArgumentNullException("Comment was not identificated");
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.Message));
            }
        }