/// <summary> /// Insert a GDPR log /// </summary> /// <param name="gdprLog">GDPR log</param> public virtual void InsertLog(GdprLog gdprLog) { if (gdprLog == null) { throw new ArgumentNullException(nameof(gdprLog)); } _gdprLogRepository.Insert(gdprLog); //event notification _eventPublisher.EntityInserted(gdprLog); }
/// <summary> /// Insert a GDPR log /// </summary> /// <param name="customer">Customer</param> /// <param name="consentId">Consent identifier</param> /// <param name="requestType">Request type</param> /// <param name="requestDetails">Request details</param> public virtual void InsertLog(Customer customer, int consentId, GdprRequestType requestType, string requestDetails) { if (customer == null) { throw new ArgumentNullException(nameof(customer)); } var gdprLog = new GdprLog { CustomerId = customer.Id, ConsentId = consentId, CustomerInfo = customer.Email, RequestType = requestType, RequestDetails = requestDetails, CreatedOnUtc = DateTime.UtcNow }; InsertLog(gdprLog); }
/// <summary> /// Insert a GDPR log /// </summary> /// <param name="gdprLog">GDPR log</param> protected virtual async Task InsertLogAsync(GdprLog gdprLog) { await _gdprLogRepository.InsertAsync(gdprLog); }