public async override Task <DeleteAuditResponse> Delete(DeleteAuditRequest request, ServerCallContext context) { IDatabase <AuditEntry> database = new MongoDatabase <AuditEntry>(); IRepository <AuditEntry> repository = new AuditRepository(database); repository.Delete(request.Audit); return(await Task.FromResult(new DeleteAuditResponse() { AuditResponse = request.Audit })); }
/// <summary> /// 删除跟踪集 /// </summary> /// <param name="req"><see cref="DeleteAuditRequest"/></param> /// <returns><see cref="DeleteAuditResponse"/></returns> public DeleteAuditResponse DeleteAuditSync(DeleteAuditRequest req) { JsonResponseModel <DeleteAuditResponse> rsp = null; try { var strResp = this.InternalRequestSync(req, "DeleteAudit"); rsp = JsonConvert.DeserializeObject <JsonResponseModel <DeleteAuditResponse> >(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return(rsp.Response); }