<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Documentation on Dotnet Data</title><link>https://artur-rios.github.io/dotnet-data/docs/</link><description>Recent content in Documentation on Dotnet Data</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://artur-rios.github.io/dotnet-data/docs/index.xml" rel="self" type="application/rss+xml"/><item><title>Architecture</title><link>https://artur-rios.github.io/dotnet-data/docs/architecture/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://artur-rios.github.io/dotnet-data/docs/architecture/</guid><description>&lt;p&gt;&lt;code&gt;ArturRios.Data&lt;/code&gt; is a family of small, focused NuGet packages. This page shows how they fit together,&#10;the key types in each, and the design principles they share.&lt;/p&gt;&#10;&lt;h2 id="package-dependencies"&gt;Package dependencies&lt;/h2&gt;&#10;&lt;pre class="mermaid"&gt;flowchart TB&#10; Output[&amp;#34;ArturRios.Output&amp;lt;br/&amp;gt;&amp;lt;i&amp;gt;DataOutput / ProcessOutput envelopes&amp;lt;/i&amp;gt;&amp;#34;]&#10;&#10; subgraph Relational[&amp;#34;Relational stack — EF Core&amp;#34;]&#10; direction TB&#10; Core[&amp;#34;ArturRios.Data.Relational.Core&amp;lt;br/&amp;gt;&amp;lt;i&amp;gt;interfaces, EfRepository, EfUnitOfWork,&amp;lt;br/&amp;gt;BaseDbContext, IDatabaseProvider seam&amp;lt;/i&amp;gt;&amp;#34;]&#10; Sqlite[&amp;#34;ArturRios.Data.Sqlite&amp;lt;br/&amp;gt;&amp;lt;i&amp;gt;AddSqliteProvider()&amp;lt;/i&amp;gt;&amp;#34;]&#10; Postgres[&amp;#34;ArturRios.Data.PostgreSql&amp;lt;br/&amp;gt;&amp;lt;i&amp;gt;AddPostgreSqlProvider()&amp;lt;/i&amp;gt;&amp;#34;]&#10; MySql[&amp;#34;ArturRios.Data.MySql&amp;#34;]&#10; Dapper[&amp;#34;ArturRios.Data.Dapper&amp;lt;br/&amp;gt;&amp;lt;i&amp;gt;read-only raw SQL&amp;lt;/i&amp;gt;&amp;#34;]&#10; end&#10;&#10; subgraph NoSQL[&amp;#34;NoSQL stores — standalone&amp;#34;]&#10; direction TB&#10; Mongo[&amp;#34;ArturRios.Data.MongoDb&amp;lt;br/&amp;gt;&amp;lt;i&amp;gt;document repository &amp;#43; transactions&amp;lt;/i&amp;gt;&amp;#34;]&#10; Dynamo[&amp;#34;ArturRios.Data.DynamoDb&amp;lt;br/&amp;gt;&amp;lt;i&amp;gt;async repository over IDynamoDBContext&amp;lt;/i&amp;gt;&amp;#34;]&#10; end&#10;&#10; subgraph Export[&amp;#34;File export — standalone&amp;#34;]&#10; direction TB&#10; ExportCore[&amp;#34;ArturRios.Data.Export&amp;lt;br/&amp;gt;&amp;lt;i&amp;gt;exporter factory, column map,&amp;lt;br/&amp;gt;CSV / JSON / TXT / MessagePack&amp;lt;/i&amp;gt;&amp;#34;]&#10; ExportExcel[&amp;#34;ArturRios.Data.Export.Excel&amp;lt;br/&amp;gt;&amp;lt;i&amp;gt;.xlsx add-on&amp;lt;/i&amp;gt;&amp;#34;]&#10; end&#10;&#10; Sqlite --&amp;gt; Core&#10; Postgres --&amp;gt; Core&#10; MySql --&amp;gt; Core&#10; Dapper --&amp;gt; Core&#10; Core --&amp;gt; Output&#10; Mongo --&amp;gt; Output&#10; Dynamo --&amp;gt; Output&#10; ExportExcel --&amp;gt; ExportCore&#10; ExportCore --&amp;gt; Output&#10;&#10; EF[&amp;#34;Microsoft.EntityFrameworkCore&amp;#34;]:::ext&#10; EfProviders[&amp;#34;Npgsql / Microting (Pomelo fork) / Sqlite EF provider&amp;#34;]:::ext&#10; DapperLib[&amp;#34;Dapper&amp;#34;]:::ext&#10; MongoLib[&amp;#34;MongoDB.Driver&amp;#34;]:::ext&#10; Aws[&amp;#34;AWSSDK.DynamoDBv2&amp;#34;]:::ext&#10; MsgPack[&amp;#34;MessagePack&amp;#34;]:::ext&#10; ClosedXml[&amp;#34;ClosedXML&amp;#34;]:::ext&#10; Core --&amp;gt; EF&#10; Sqlite --&amp;gt; EfProviders&#10; Postgres --&amp;gt; EfProviders&#10; MySql --&amp;gt; EfProviders&#10; Dapper --&amp;gt; DapperLib&#10; Mongo --&amp;gt; MongoLib&#10; Dynamo --&amp;gt; Aws&#10; ExportCore --&amp;gt; MsgPack&#10; ExportExcel --&amp;gt; ClosedXml&#10;&#10; classDef ext fill:#8882,stroke-dasharray:3 3;&lt;/pre&gt;&#10;&lt;p&gt;&lt;strong&gt;The families are deliberately separate.&lt;/strong&gt; The relational providers and the Dapper read path build&#10;on &lt;code&gt;ArturRios.Data.Relational.Core&lt;/code&gt; (EF Core). The NoSQL packages do &lt;strong&gt;not&lt;/strong&gt; depend on the relational&#10;core — pulling EF Core into a MongoDB or DynamoDB app would be wasteful — so they depend only on&#10;&lt;code&gt;ArturRios.Output&lt;/code&gt; and their native driver. MongoDB and DynamoDB are also separate from each other: their&#10;data models diverge too much (composite keys and a key/scan access model in DynamoDB vs. documents with&#10;LINQ/predicate queries in MongoDB) to share one interface without becoming leaky. The export packages&#10;are independent of all of it — they take any &lt;code&gt;IEnumerable&amp;lt;T&amp;gt;&lt;/code&gt;, so they need no store at all.&lt;/p&gt;</description></item><item><title>Relational</title><link>https://artur-rios.github.io/dotnet-data/docs/relational/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://artur-rios.github.io/dotnet-data/docs/relational/</guid><description>&lt;p&gt;The relational stack is a provider-agnostic data-access layer over Entity Framework Core. You install&#10;the &lt;strong&gt;core&lt;/strong&gt; plus a &lt;strong&gt;provider&lt;/strong&gt; for your engine; the core gives you enveloped repositories, a unit of&#10;work, optimistic concurrency, and DI wiring, while the provider teaches it how to talk to PostgreSQL,&#10;SQLite, or MySQL.&lt;/p&gt;&#10;&lt;h2 id="install"&gt;Install&lt;/h2&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;dotnet add package ArturRios.Data.Relational.Core&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;dotnet add package ArturRios.Data.Sqlite &lt;span class="c1"&gt;# or ArturRios.Data.PostgreSql / ArturRios.Data.MySql&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;table&gt;&#10;&#9;&lt;thead&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Provider package&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;&lt;code&gt;DatabaseType&lt;/code&gt;&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Status&lt;/th&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/thead&gt;&#10;&#9;&lt;tbody&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;code&gt;ArturRios.Data.Sqlite&lt;/code&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;code&gt;SqLite&lt;/code&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Available&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;code&gt;ArturRios.Data.PostgreSql&lt;/code&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;code&gt;PostgreSql&lt;/code&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Available&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;code&gt;ArturRios.Data.MySql&lt;/code&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;code&gt;MySql&lt;/code&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Available — see &lt;a href="https://artur-rios.github.io/dotnet-data/docs/relational/#mysql-and-mariadb"&gt;MySQL and MariaDB&lt;/a&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;h2 id="1-define-entities"&gt;1. Define entities&lt;/h2&gt;&#10;&lt;p&gt;Derive from &lt;code&gt;Entity&lt;/code&gt; (an &lt;code&gt;int Id&lt;/code&gt; mapped as the first column), or &lt;code&gt;VersionedEntity&lt;/code&gt; to opt into&#10;optimistic concurrency (adds a &lt;code&gt;Guid ConcurrencyStamp&lt;/code&gt;).&lt;/p&gt;</description></item><item><title>MongoDB</title><link>https://artur-rios.github.io/dotnet-data/docs/mongodb/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://artur-rios.github.io/dotnet-data/docs/mongodb/</guid><description>&lt;p&gt;&lt;code&gt;ArturRios.Data.MongoDb&lt;/code&gt; is a standalone document-repository package over &lt;code&gt;MongoDB.Driver&lt;/code&gt; — it does&#10;&lt;strong&gt;not&lt;/strong&gt; depend on the relational core, so it pulls in no EF Core. It keeps the same enveloped style:&#10;every method returns a &lt;code&gt;DataOutput&lt;/code&gt; / &lt;code&gt;ProcessOutput&lt;/code&gt;.&lt;/p&gt;&#10;&lt;h2 id="install"&gt;Install&lt;/h2&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;dotnet add package ArturRios.Data.MongoDb&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="1-define-a-document"&gt;1. Define a document&lt;/h2&gt;&#10;&lt;p&gt;Derive from &lt;code&gt;Document&lt;/code&gt; (a string &lt;code&gt;Id&lt;/code&gt; mapped to Mongo&amp;rsquo;s &lt;code&gt;_id&lt;/code&gt; as an &lt;code&gt;ObjectId&lt;/code&gt;), or &lt;code&gt;VersionedDocument&lt;/code&gt;&#10;to opt into optimistic concurrency (adds a &lt;code&gt;long Version&lt;/code&gt;).&lt;/p&gt;</description></item><item><title>DynamoDB</title><link>https://artur-rios.github.io/dotnet-data/docs/dynamodb/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://artur-rios.github.io/dotnet-data/docs/dynamodb/</guid><description>&lt;p&gt;&lt;code&gt;ArturRios.Data.DynamoDb&lt;/code&gt; is a standalone, &lt;strong&gt;async-only&lt;/strong&gt; repository over the AWS SDK&amp;rsquo;s high-level&#10;object-persistence model (&lt;code&gt;IDynamoDBContext&lt;/code&gt;). It does not depend on the relational core. Every method&#10;returns a &lt;code&gt;DataOutput&lt;/code&gt; / &lt;code&gt;ProcessOutput&lt;/code&gt; envelope.&lt;/p&gt;&#10;&lt;h2 id="install"&gt;Install&lt;/h2&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;dotnet add package ArturRios.Data.DynamoDb&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="1-define-an-item"&gt;1. Define an item&lt;/h2&gt;&#10;&lt;p&gt;There&amp;rsquo;s no base class — annotate a POCO with the AWS attributes. Keys are a partition (hash) key plus an&#10;optional sort (range) key; add &lt;code&gt;[DynamoDBVersion]&lt;/code&gt; to opt into optimistic concurrency.&lt;/p&gt;</description></item><item><title>Export</title><link>https://artur-rios.github.io/dotnet-data/docs/export/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://artur-rios.github.io/dotnet-data/docs/export/</guid><description>&lt;p&gt;&lt;code&gt;ArturRios.Data.Export&lt;/code&gt; turns any &lt;code&gt;IEnumerable&amp;lt;T&amp;gt;&lt;/code&gt; into &lt;strong&gt;CSV&lt;/strong&gt;, &lt;strong&gt;JSON&lt;/strong&gt;, &lt;strong&gt;TXT&lt;/strong&gt;, or &lt;strong&gt;MessagePack&lt;/strong&gt;,&#10;over a stream or straight to a file. &lt;code&gt;ArturRios.Data.Export.Excel&lt;/code&gt; adds &lt;strong&gt;.xlsx&lt;/strong&gt; as a separate add-on.&lt;/p&gt;&#10;&lt;p&gt;Both are standalone — they work with plain POCOs and depend on neither the relational core nor a&#10;database driver. They keep the same enveloped style as the rest of the family: every write returns a&#10;&lt;code&gt;ProcessOutput&lt;/code&gt;, so a locked file or a serialization failure comes back as an error on the result&#10;rather than an unhandled exception.&lt;/p&gt;</description></item></channel></rss>