/// <summary> /// Get the audit records for the specified date range using the Partner Center API. /// </summary> /// <param name="endDate">The end date of the audit record logs.</param> /// <param name="startDate">The start date of the audit record logs.</param> /// <returns>A partial view containing the requested audit record logs.</returns> public async Task <PartialViewResult> GetRecords(DateTime endDate, DateTime startDate) { AuditRecordsModel auditRecordsModel = new AuditRecordsModel() { Records = await this.Service.PartnerCenter.AuditRecords.QueryAsync(startDate, endDate, QueryFactory.Instance.BuildSimpleQuery()) }; return(this.PartialView("Records", auditRecordsModel)); }
/// <summary> /// Get the audit records for the specified date range using the Partner Center API. /// </summary> /// <param name="endDate">The end date of the audit record logs.</param> /// <param name="startDate">The start date of the audit record logs.</param> /// <returns>A partial view containing the requested audit record logs.</returns> public async Task<PartialViewResult> GetRecords(DateTime endDate, DateTime startDate) { AuditRecordsModel auditRecordsModel = new AuditRecordsModel() { Records = await Provider.PartnerOperations.GetAuditRecordsAsync(startDate, endDate).ConfigureAwait(false) }; return PartialView("Records", auditRecordsModel); }
/// <summary> /// Get the audit records for the specified date range using the Partner Center API. /// </summary> /// <param name="endDate">The end date of the audit record logs.</param> /// <param name="startDate">The start date of the audit record logs.</param> /// <returns>A partial view containing the requested audit record logs.</returns> public async Task <PartialViewResult> GetRecords(DateTime endDate, DateTime startDate) { IAggregatePartner operations = await new SdkContext().GetPartnerOperationsAysnc(); AuditRecordsModel auditRecordsModel = new AuditRecordsModel() { Records = operations.AuditRecords.Query(startDate, endDate, QueryFactory.Instance.BuildSimpleQuery()) }; return(PartialView("Records", auditRecordsModel)); }