示例#1
0
        /// <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);
        }
示例#2
0
        /// <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);
        }
示例#3
0
 /// <summary>
 /// Insert a GDPR log
 /// </summary>
 /// <param name="gdprLog">GDPR log</param>
 protected virtual async Task InsertLogAsync(GdprLog gdprLog)
 {
     await _gdprLogRepository.InsertAsync(gdprLog);
 }