---
title: "SQL-040: Create OregonBusiness via CreateOregonBusinessRow"
summary: Create operation against OregonBusiness via NHibernate ORM.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-09-24
library: SAIF.Services
reference_type: package
---

# SQL-040: Create OregonBusiness via CreateOregonBusinessRow

This ORM statement performs a create operation on `OregonBusiness` via `CreateOregonBusinessRow`, executed from `Services/SAIF.Services/Policies/DcbsOregonBusiness/OregonBusinessService.cs` (L127).

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-040 |
| **Operation type** | Create |
| **Execution method** | ORM (IRepository.Add) |
| **Database** | Oracle |
| **Schema** | [unqualified]** |
| **Command type** | N/A (ORM-generated) |
| **Business object** | `OregonBusiness` |
| **Criteria property** | N/A — ORM |
| **Lifecycle method** | `CreateOregonBusinessRow` |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:Id` | Input | `long` | N/A | Identifier from `WCIS_DBA.DCBS_OREGON_BUSINESS_SEQ_NUM.NEXTVAL` |
| `:RegistryNumberText` | Input | `string` | N/A |  |
| `:BusinessName` | Input | `string` | N/A |  |
| `:RegistryDate` | Input | `DateTime` | N/A |  |
| `:FirstName` | Input | `string` | N/A |  |
| `:MiddleName` | Input | `string` | N/A |  |
| `:LastName` | Input | `string` | N/A |  |
| `:Suffix` | Input | `string` | N/A |  |
| `:NotOfRecordEntity` | Input | `string` | N/A |  |
| `:EntityOfRecordRegNumberText` | Input | `string` | N/A |  |
| `:EntityOfRecordName` | Input | `string` | N/A |  |
| `:AddressLine1` | Input | `string` | N/A |  |
| `:AddressLine2` | Input | `string` | N/A |  |
| `:StateCode` | Input | `string` | N/A |  |
| `:ZipCode` | Input | `string` | N/A |  |
| `:BusinessDetails` | Input | `string` | N/A |  |
| `:CreateDate` | Input | `DateTime` | N/A |  |
| `:CreateUser` | Input | `string` | N/A |  |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [WCIS_DBA.DCBS_OREGON_BUSINESS](../database-tables.md#dcbs_oregon_business) | INSERT | DCBS_OREGON_BUSINESS_SEQ_NUM, REGISTRY_NUMBER_TEXT, BUSINESS_NAME, REGISTRY_DATE, FIRST_NAME, MIDDLE_NAME, LAST_NAME, SUFFIX, NOT_OF_RECORD_ENTITY, ENTITY_OF_RECORD_REG_NUM_TXT, ENTITY_OF_RECORD_NAME, ADDRESS_LINE1, ADDRESS_LINE2, STATE, ZIP_CODE, BUSINESS_DETAILS, CREATE_DATE, CREATE_USER (identifier from sequence `WCIS_DBA.DCBS_OREGON_BUSINESS_SEQ_NUM.NEXTVAL`) |

## LINQ statement

Source: `Services/SAIF.Services/Policies/DcbsOregonBusiness/OregonBusinessService.cs:127`.

```csharp
// Services/SAIF.Services/Policies/DcbsOregonBusiness/OregonBusinessService.cs:127
unitOfWork.GetRepository<OregonBusiness>().Add(buildBusiness);
```

## Sample SQL

> **Inferred SQL:** This SQL was inferred from the LINQ statement above and the NHibernate mappings. It is not concrete SQL from source code; NHibernate generates the executed statement at runtime, so aliases, column order, join syntax, and bind-parameter names may differ.

```sql
-- Inferred from LINQ (NHibernate mapping translation); not concrete SQL
SELECT WCIS_DBA.DCBS_OREGON_BUSINESS_SEQ_NUM.NEXTVAL
FROM DUAL

INSERT INTO WCIS_DBA.DCBS_OREGON_BUSINESS (
  DCBS_OREGON_BUSINESS_SEQ_NUM,
  REGISTRY_NUMBER_TEXT,
  BUSINESS_NAME,
  REGISTRY_DATE,
  FIRST_NAME,
  MIDDLE_NAME,
  LAST_NAME,
  SUFFIX,
  NOT_OF_RECORD_ENTITY,
  ENTITY_OF_RECORD_REG_NUM_TXT,
  ENTITY_OF_RECORD_NAME,
  ADDRESS_LINE1,
  ADDRESS_LINE2,
  STATE,
  ZIP_CODE,
  BUSINESS_DETAILS,
  CREATE_DATE,
  CREATE_USER)
VALUES (
  :Id,
  :RegistryNumberText,
  :BusinessName,
  :RegistryDate,
  :FirstName,
  :MiddleName,
  :LastName,
  :Suffix,
  :NotOfRecordEntity,
  :EntityOfRecordRegNumberText,
  :EntityOfRecordName,
  :AddressLine1,
  :AddressLine2,
  :StateCode,
  :ZipCode,
  :BusinessDetails,
  :CreateDate,
  :CreateUser)
```

Translation notes:
- `:Id` is the value fetched from sequence `WCIS_DBA.DCBS_OREGON_BUSINESS_SEQ_NUM` (`GeneratedBy.Native("WCIS_DBA.DCBS_OREGON_BUSINESS_SEQ_NUM")`) before the INSERT; NHibernate assigns it to `OregonBusiness.Id`.
- `City` and `AssociatedNameType` are assigned on `buildBusiness` (`OregonBusinessService.cs:109,119`) but are not mapped by `OregonBusinessMap`, so they are not persisted.

## Operations and processes
- OregonBusinessService.CreateOregonBusinessRow — see [Operations and processes](../operations-processes.md)

> **Note:** Statements marked with `**` could not be confirmed; treat as unknown until verified.

## Sources
- `Services/SAIF.Services/Policies/DcbsOregonBusiness/OregonBusinessService.cs (L127)`
