예제 #1
0
        public HttpResponseMessage CreateAuditRecords([FromBody] AuditRecord auditRecord)
        {
            try
            {
                Setup();

                _logger.WriteLogEntry(_tenantId.ToString(), null, string.Format(MethodBase.GetCurrentMethod().Name + " in " + _name), LogLevelType.Info);
                _auditService.CreateAuditRecords(auditRecord, _user);
                return(this.Request.CreateResponse(HttpStatusCode.OK));
            }
            catch (Exception ex)
            {
                _logger.WriteLogEntry(_tenantId.ToString(), null, string.Format(MethodBase.GetCurrentMethod().Name + " in " + _name), LogLevelType.Error, ex);
                throw ex.AddEntityValidationInfo();
            }
        }