Ejemplo n.º 1
0
        public async Task <IActionResult> AuditLoad(Guid loadId, string auditTypeId)
        {
            if (Enum.TryParse(auditTypeId, out AuditTypeData auditTypeEnum))
            {
                var numRowsInserted = await _loadService.CreateLoadAuditLogEntryAsync(loadId, auditTypeEnum);

                return(Success(numRowsInserted));
            }

            return(Error <int>(new ArgumentException("Invalid AuditTypeId provided")));
        }