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