Skip to content

History

Revisions

  • Document SqlParam factories, TVP null semantics and RETURN handling for 4.1.0

    @lobodava lobodava committed Nov 8, 2026
    b097af8
  • Document 4.1.0: synchronize API contracts, mapper validation, SQL guidance and Claude skill usage

    @lobodava lobodava committed Nov 7, 2026
    effdeec
  • Wiki Sprint 6: repoint article URLs version-4.x.x -> master Now that v4.0.0 has been merged into master, the canonical home for the re-published CodeProject articles is master/articles/, not the version-4.x.x branch. Updated all five pages adjusted by Sprint 5: - Artisan-Way-of-Data-Reply.md - Negative-identities-and-object-graph-saving.md - INode-Interface-and-ToTree-Methods.md - _Sidebar.md - Home.md 16 URL replacements total, content otherwise identical.

    @lobodava lobodava committed May 8, 2026
    413aed1
  • Wiki Sprint 5: cross-link the four re-published CodeProject articles - Artisan-Way-of-Data-Reply: replace dead CodeProject links with article 03 - Negative-identities-and-object-graph-saving: add 'Background reading' callout pointing to article 01 + bottom link - INode-Interface-and-ToTree-Methods: add callout pointing to article 04; replace inline CodeProject reference with the local article - _Sidebar / Home: add 'Background reading' section listing all four long-form articles Articles live on the version-4.x.x branch of the main repo; URLs target that branch until the v4 release lands on master.

    @lobodava lobodava committed May 4, 2026
    0e7d700
  • Wiki Sprint 4: depth pages — output params, JSON, DateOnly/TimeOnly, testing, performance Five new pages plus sidebar/home update. Closes the depth gaps left after Sprint 3 — the v4 features that were only mentioned briefly in Whats-New-in-v4 now have dedicated pages, plus two new integration topics (testing, performance). NEW PAGES --------- - Output-Parameters.md Tour of the nine typed Add*OutputParam helpers added in v4 (Bit/TinyInt/SmallInt/Int/BigInt/Decimal/Guid/DateTime2/ DateTimeOffset). Read-back patterns via cmd.Parameters[...].Value, the DBNull-vs-null trap, multiple-output examples (saved id + status, GetUserStats with three outputs), and the relationship to the auto-added @ReturnValue parameter. - Json-Parameters-NET6.md AddJsonParam<T> reference. Round-trip example with OPENJSON ... WITH (...) on the SQL side, anonymous-typed payloads, OPENJSON array projection as a lighter-weight TVP alternative. Includes a decision table for 'JSON vs TVP' across cost, schema validation, database setup, payload heterogeneity, and bulk-insert size. - DateOnly-TimeOnly-NET6.md AddDateParam(DateOnly) / AddTimeParam(TimeOnly) parameter helpers (sync + nullable variants), plus dr.GetDateOnly / dr.GetTimeOnly with the default-value overloads. End-to-end example with an Appointment record. Auto-mapping notes — ReadAs<T> recognises DateOnly/TimeOnly properties. - Testing-Your-Repository.md The integration-test approach. Layout reference of the existing Tests/ project (DAL/, DataServices/, Tests/), minimal MSTest 4 test-class skeleton, async test patterns, the canonical (expected, actual) Assert ordering enforced by MSTEST0017, three cleanup isolation patterns (per-test cleanup vs always-rolled-back transaction vs db-republish-per-class), gated execution when the DB is unreachable in CI, and the smoke-test pattern for catching schema / mapper drift after publishing the Database/ project. - Performance-Notes.md Production checklist. Connection pooling (Pooling=True) as the single biggest deciding factor. Repository lifetime guidance. Registered-mapper vs auto-mapping warmup amortisation. ReadToList vs ReadToEnumerable vs ReadToAsyncEnumerable comparison table. BulkCopy batchSize tuning. Index discipline for MERGE-based object graph saves. Notes on async vs sync (when it matters and when not). CommandBehavior.SequentialAccess for blob streaming. NAVIGATION ---------- - _Sidebar.md, Home.md Added two new sections after the existing 'v4 features' block: 'Reference' -> Output Parameters, JSON (NET6+), DateOnly/TimeOnly (NET6+) 'Patterns & integration' (extended) -> Testing Your Repository, Performance Notes The original page hierarchy is unchanged. Local-only commit (does not affect origin/master).

    @lobodava lobodava committed May 3, 2026
    e01c8b8
  • Wiki Sprint 3: pages for v4 features + ASP.NET integration + tree/data-reply rewrites Five new pages and three substantial rewrites. Closes the gap between the v4 codebase and the wiki — every public API mentioned in the v4 XML doc comments now has a corresponding wiki page. NEW PAGES (v4 features) ----------------------- - BulkCopy.md Full coverage of BulkCopy<T> / BulkCopyAs<T>, sync + async, SqlConnection extensions and RepositoryBase wrappers. SqlBulkCopyOptions tour (TableLock, KeepIdentity, KeepNulls, CheckConstraints, FireTriggers), batchSize tuning notes, transaction integration, and a 'when to prefer a TVP instead' comparison. - ReadToLists-Multi-Result-Sets.md The 2-/3-/4-tuple variants for multi-result-set procedures. Registered-mapper and createFunc paths, async + CancellationToken, and a worked example pairing ReadToLists with MergeJoin for parent-child graph assembly. - MergeJoin.md Single-pass O(N+M) merge-join algorithm for stitching flat result sets into object graphs. Spells out the critical sorted-input precondition (with a worked 'silently dropped rows' failure mode), contrasts with LINQ GroupJoin's Dictionary-based approach, and documents all three overloads: - master + detail - master + two parallel details (e.g. orders + lineitems + payments) - master + detail + sub-detail (three-level nested hierarchies) Closes with a complete end-to-end example using ReadToLists. - Streaming-Async-Enumerable.md ReadToAsyncEnumerable<T> / ReadAsAsyncEnumerable<T>. When to stream vs ReadToList (memory, latency, early-break patterns). Cancellation via constructor parameter or .WithCancellation(ct). Connection-lifetime gotcha (the SqlConnection is held open for the entire iteration -> don't issue other queries on the same repo during await foreach). - Using-Artisan-in-ASP.NET-Core.md The DI integration story discussed in chat. Why Scoped (not Singleton or Transient), how scope sharing lets two services in the same HTTP request share a transaction, BackgroundService + IServiceScopeFactory pattern, Pooling=True production warning, IConfiguration / appsettings.json wiring, optional bulk-registration helper using ActivatorUtilities.CreateInstance. REWRITES (stubs and outdated) ----------------------------- - Artisan-Way-of-Data-Reply.md (was 3 lines pointing at a 2017 CodeProject article) Full doc page now: the wire format (status -> messages -> data), CheckForDataReplyException usage, the built-in DataReplyStatus values, controller pattern that returns 4xx with structured Status/Messages payload. 'Why not just RAISERROR/THROW' rationale. - INode-Interface-and-ToTree-Methods.md (was 31 lines, mostly a method list) Full Folder example with INode<Folder> implementation and a recursive-CTE stored procedure that returns rows in pre-order traversal. Documents the hierarchicallySorted parameter (when to flip it on, how the SQL must be ordered to be correct), the ReadToTree vs ReadToTreeList distinction (single root vs forest), and the ToTree() / ToTreeList() extension methods on flat lists for offline tree building. - Code-Generation.md (was 10 lines with stale 'T4 is on the TODO list' framing from years ago) Modernised tone — describes what the SQL generator script actually does today, what gets generated, what still has to be hand-written, and the limitations to look out for (computed columns, exotic SQL types, decimals). NAVIGATION ---------- - _Sidebar.md, Home.md Added two new sections after the existing list: 'v4 features' -> BulkCopy, ReadToLists, MergeJoin, Streaming 'Patterns & integration' -> Using Artisan.Orm in ASP.NET Core The original page hierarchy is unchanged, so existing links keep working. Local-only commit (does not affect origin/master).

    @lobodava lobodava committed May 3, 2026
    e136762
  • Wiki Sprint 2: rewrites for outdated content, expand stubs, add What's New Eight pages substantively rewritten and one new page. Focus is on removing factually wrong descriptions of removed-in-v4 machinery and giving new readers an entry point to the v4 changes. REWRITES (factually outdated) ----------------------------- - About-Connection-Strings.md Removed: Web.config / App.config auto-discovery, machine-name override, {Configuration}.{Name} layering. None of that exists in v4 (the constructor takes the connection string directly). Added: appsettings.json + IConfiguration + DI flow, user-secrets and ASPNETCORE_ENVIRONMENT for per-environment overrides, connection-pool warning, brief .NET Framework note. - Getting-Started.md Step 2 (config): updated from Web.config XML-only to appsettings.json primary, with .NET Framework as a fallback note. Step 3 (constructor): clarified that the connection string is passed explicitly, not auto-resolved. Step 5 (lifetime): replaced the legacy try/catch/finally pattern (which had a real bug — repository would be null on ctor failure) with the three modern patterns: Scoped DI registration + injection (ASP.NET Core), 'using var' (console / scripts), IServiceScopeFactory.CreateScope (background workers). - Transactions.md Reorganised around the choice between BeginTransaction (manual commit) and RunInTransaction (auto commit) — previously only BeginTransaction was documented. Added RunInTransaction and RunInTransactionAsync / BeginTransactionAsync sections with examples (TransferFunds-style flow). Comparison table at the top. NEW PAGE -------- - Whats-New-in-v4.md Summarises target frameworks, configuration changes, and the new APIs added in Levels 1-3 (BulkCopy, ReadToLists, MergeJoin, ReadToAsyncEnumerable, AddJsonParam<T>, DateOnly/TimeOnly, output parameters, default-value Get* extensions, pre-populated lists, async transactions, async-symmetry methods). Cross-links to pages that will be written in Sprint 3 (BulkCopy, MergeJoin, ReadToLists, Streaming, Using-Artisan-in-ASP.NET-Core). STUBS EXPANDED -------------- - RepositoryBase.md (was 14 lines): proper overview of what the base class provides, lifetime guidance, constructor signatures, and a schematic public surface. - Auto-Mapping.md (was 9 lines): full lifecycle of the expression-tree builder, when to use vs registered MapperFor, AOT note, example with a User type. Added cross-link to AsDataTable<T>. - Inline-Mappers.md (was 10 lines): three idiomatic uses (anonymous type, tuple, one-off class), when to graduate to a registered mapper, performance note (no reflection, no caching needed). NAVIGATION ---------- - _Sidebar.md, Home.md: prepended 'What's New in v4' link as the first entry under the home link, so new visitors land on the v4 summary before drilling into specific topics. - Display text 'SqlDataReader extentions' on the sidebar already fixed to 'extensions' in Sprint 1; URL still points at the legacy slug. Local-only commit (does not affect origin/master).

    @lobodava lobodava committed May 3, 2026
    777746a
  • Wiki Sprint 1: spelling, grammar, broken code samples Surface-level cleanup pass. No structural changes, no factual rewrites, no renames. Eighteen pages touched, ~49 line edits. Spelling (applied across all pages where they occurred): - extentions -> extensions - Disctionary -> Dictionary - IEnumarable -> IEnumerable - usefull -> useful - compiller -> compiler - JavaSctipt -> JavaScript - assignes -> assigns - SqlParemeter -> SqlParameter - paremeter / Paremeter -> parameter / Parameter - forign key -> foreign key - finaly -> finally Grammar: - 'than' vs 'then' confusion in conditional clauses - 'wich' -> 'which' - 'inherints' -> 'inherits' - 'theirs names' -> 'their names' - 'each of developers' -> 'each developer' - 'because of <subject>' -> 'because <subject>' - 'compiler does not throws' -> 'compiler does not raise' - 'should the required method is not found' -> '... not be found' - 'If to <verb>' -> 'If you <verb>' - 'in final part' -> 'in the finally part' Broken code samples: - The-Sample.md: missing closing paren on [MapperFor(typeof(User))] - The-Sample.md: 'in not null' -> 'int not null' - The-Sample.md, Mappers.md, Sample: 'mapper static vlass' typo - Read-Methods-Understanding.md: 'user.RoldeIds' -> 'user.RoleIds' - Mappers.md: SQL-style '--' comment inside C# code block -> '//' Fact correction in tables: - SqlCommand-AddParam-extensions.md: AddTimeParam C# type was wrongly listed as 'Boolean'; it is 'TimeSpan'. Sidebar / Home display text: - 'SqlDataReader extentions' -> 'SqlDataReader extensions' (URL kept, legacy page name 'SqlDataReader-Extentions' is preserved for stable links; only display text fixed) JSON example fix: - Negative-identities-...md: nested-record name 'name: "(A)b"' -> '"(A)Ab"' to match the textual diagram on the same page Awkward phrasings rewritten: - 'array list of values' -> 'array of values' - 'using an automapping' -> 'using auto-mapping' - 'add this parameter' -> 'adds this parameter' - 'pass it as an argument' -> 'passes it as an argument' - 'Call the Func parameter' -> 'Calls the Func parameter' What was NOT touched (deferred to later sprints): - Outdated content describing legacy .NET Framework App.config / ConnectionStringHelper machinery (Sprint 2) - v4 API additions completely missing from the wiki: BulkCopy, ReadToLists, MergeJoin, AsyncEnumerable, output params, JSON parameters, default-value Get* (Sprint 3) - Stub pages that need real content: Auto-Mapping, Inline-Mappers, RepositoryBase (Sprint 2)

    @lobodava lobodava committed May 3, 2026
    0b791d5
  • Updated About Connection Strings (markdown)

    @lobodava lobodava committed Apr 20, 2023
    dfa1ef4
  • Updated About Connection Strings (markdown)

    @lobodava lobodava committed Apr 20, 2023
    43aee1d
  • Updated Getting Started (markdown)

    @lobodava lobodava committed Apr 20, 2023
    b84113a
  • Updated Getting Started (markdown)

    @lobodava lobodava committed Apr 20, 2023
    d6865e7
  • Updated Mappers (markdown)

    @lobodava lobodava committed Feb 16, 2018
    3c27c9c
  • Updated _Sidebar (markdown)

    @lobodava lobodava committed Feb 12, 2018
    c5eb736
  • Updated Home (markdown)

    @lobodava lobodava committed Feb 12, 2018
    ff10dff
  • Updated Simple Sample (markdown)

    @lobodava lobodava committed Feb 11, 2018
    fd0a472
  • Updated Read Methods Understanding (markdown)

    @lobodava lobodava committed Jun 21, 2017
    d28042d
  • Updated Home (markdown)

    @lobodava lobodava committed Jun 21, 2017
    527665f
  • Updated _Sidebar (markdown)

    @lobodava lobodava committed Jun 21, 2017
    bbc7983
  • Created INode Interface and ToTree Methods (markdown)

    @lobodava lobodava committed Jun 21, 2017
    622b14f
  • Updated Inline Mappers (markdown)

    @lobodava lobodava committed Jun 14, 2017
    6632f0d
  • Updated _Sidebar (markdown)

    @lobodava lobodava committed Jun 13, 2017
    33da63c
  • Updated Home (markdown)

    @lobodava lobodava committed Jun 13, 2017
    8b57dc2
  • Updated Read Methods Understanding (markdown)

    @lobodava lobodava committed Jun 13, 2017
    832540c
  • Updated Inline Mappers (markdown)

    @lobodava lobodava committed Jun 13, 2017
    a17a344
  • Created Inline Mappers (markdown)

    @lobodava lobodava committed Jun 13, 2017
    0b69612
  • Updated RequiredMethod for MapperFor Attribute (markdown)

    @lobodava lobodava committed Jun 13, 2017
    43ca743
  • Updated Transactions (markdown)

    @lobodava lobodava committed Jun 13, 2017
    9a35638
  • Updated Code Generation (markdown)

    @lobodava lobodava committed Jun 13, 2017
    20f6590
  • Updated Code Generation (markdown)

    @lobodava lobodava committed Jun 13, 2017
    785a5f3