public async Task RemoveAsync([Required] RemoveParams parameters) { // Check if player is authenticated await _authentication.AuthenticateAsync(parameters.AuthToken); var comment = await _repository.Comments.FindAsync(parameters.CommentId); _repository.Comments.Remove(comment); await _repository.SaveChangesAsync(); }
public async Task <IActionResult> Remove([FromBody] RemoveParams someParams) { await myClass.Remove(someParams.id); return(Ok("remove")); }