New Features
- SQL Server Input/Output Parameters (#868) — Support for SQL Server stored procedure input and output parameters
- Index Include Columns (#882) — Added support for index include columns in generated indexes
- Stored Procedure Decimal Precision (#411) — Now obtains and applies decimal precision and scale for stored procedure parameters
- File-Scoped Namespaces (#790) — Support for file-scoped namespaces in generated code
Bug Fixes
- #nullable Directive Handling (#883, #884) — Fixed
#nullabledirective bracketing for generated DbContext and factory classes - TableSuffix Setting — Fixed
HasTriggerandMemoryOptimisedTablessettings were being ignored when usingTableSuffix - Improved handling of duplicate type cases
Note for users upgrading
There is a small breaking change for callers of generated stored procedure methods with OUTPUT parameters.
Stored-procedure OUTPUT parameters are now generated as ref instead of out (#868).
SQL Server reports every OUTPUT parameter as input/output (PARAMETER_MODE = INOUT), and such parameters can pass a value into the procedure as well as return one. Generated callers previously used out with ParameterDirection.Output, which discarded the incoming value - so procedures that read their OUTPUT parameter received null/default instead of the value supplied. They are now generated as ref with ParameterDirection.InputOutput, which sends the value in and reads the result back.
Action required: update affected call sites from out myParam to ref myParam, and initialise the variable first (a ref argument must be assigned). For example, int qty; db.MyProc(out qty); becomes int? qty = 0; db.MyProc(ref qty);. Procedures that only write to the parameter are functionally unchanged.
Why this is breaking: SQL Server's metadata (INFORMATION_SCHEMA.PARAMETERS) cannot distinguish "pure OUT" from "IN OUT" parameters - all OUTPUT parameters are reported as INOUT. The generator, therefore, treats every OUTPUT parameter as bidirectional. ref is a strict superset of out, so this is the safe default, but it does change the call site.