SQL-268: EbillingExtensions.SeedForEbilling¶
This statement is a read operation invoked through ORM (NHibernate LINQ). Executed by EbillingExtensions.SeedForEbilling.
Classification¶
| Field | Value |
|---|---|
| SQL ID | SQL-268 |
| Operation type | Read |
| Execution method | ORM (NHibernate LINQ) |
| Database | Oracle* |
| Schema | [unqualified]** |
| Command type | N/A (ORM-generated) |
| Business object | EbillingExtensions |
| Criteria property | N/A — ORM |
| Lifecycle method | SeedForEbilling |
Tables¶
| Table | Access | Columns used |
|---|---|---|
| EBILL_SET_TYPE_CODE | INSERT ×4 (hypothetical) | CODE, UPDATE_NUM, CODE_DESCR, TRANSACTION_SET_ID_CODE, MANUAL_VERSION_NUM, UPDATE_USER, UPDATE_DATE |
LINQ statement¶
Source: Data/SAIF.Data/TestRepository/RepositoryExtensions/EbillingExtensions.cs:16.
// Data/SAIF.Data/TestRepository/RepositoryExtensions/EbillingExtensions.cs:16
uow.GetRepository<EbillSetTypeCode>().Seed();
// Data/SAIF.Data/TestRepository/RepositoryExtensions/EbillingExtensions.cs:75-88
public static void Seed(this IRepository<EbillSetTypeCode> repository)
{
//select * from ebill_set_type_code;
//select 'repository.Add(new EbillSetTypeCode { Code = "' || code ||
// '", Description = "' || code_descr || '", ManualVersionNumber = "' || manual_version_num ||
// '", TransactionSetIdCode = "' || transaction_set_id_code || '"});' as code
// from ebill_set_type_code;
repository.Add(new EbillSetTypeCode { Code = "PROF", Description = "Professional", ManualVersionNumber = "005010X222A1", TransactionSetIdCode = "837" });
repository.Add(new EbillSetTypeCode { Code = "INST", Description = "Institutional", ManualVersionNumber = "005010X223A2", TransactionSetIdCode = "837" });
repository.Add(new EbillSetTypeCode { Code = "DENT", Description = "Dental", ManualVersionNumber = "005010X224A2", TransactionSetIdCode = "837" });
// ... 1 further Add/AddCode call(s) through line 88 (elided)
}
Sample SQL¶
Test double — no runtime SQL. This statement executes against
TestUnitOfWork/TestRepository<T>(in-memory,List<TEntity>-backed test doubles inSAIF.Framework.Core); no NHibernate session is opened and no SQL is issued at runtime. The SQL below is the hypothetical statement the same expression would produce against a real NHibernateIUnitOfWorkusing the in-repo mappings, shown to document the mapping shape only — no database table is accessed when this code runs.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.
-- Inferred from LINQ (NHibernate mapping translation); not concrete SQL
INSERT INTO EBILL_SET_TYPE_CODE (
CODE,
UPDATE_NUM,
CODE_DESCR,
TRANSACTION_SET_ID_CODE,
MANUAL_VERSION_NUM,
UPDATE_USER,
UPDATE_DATE)
VALUES (
:Code,
:UpdateNumber,
:Description,
:TransactionSetIdCode,
:ManualVersionNumber,
:UpdateUser,
:UpdateDate)
-- issued 4 time(s) (one per repository.Add, lines 75-88)
Translation notes:
- Rows are added directly with repository.Add(new T {...}) (no existence probe).
Sources¶
Data/SAIF.Data/TestRepository/RepositoryExtensions/EbillingExtensions.cs:16