public async Task <IActionResult> DeleteKeyOutcome(string empId, string Id) { ObjectId objId = new ObjectId(Id); var keyResult = await resultArea.QuerySingleByKeyOutcome(objId); if (keyResult != null) { var result = await resultArea.DeleteKeyOutcome(objId, keyResult); if (result == null) { return(BadRequest()); } return(Ok(new { success = true, result })); } return(NoContent()); }