TrishkaV.EntityScribe 1.0.2

dotnet add package TrishkaV.EntityScribe --version 1.0.2
                    
NuGet\Install-Package TrishkaV.EntityScribe -Version 1.0.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="TrishkaV.EntityScribe" Version="1.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TrishkaV.EntityScribe" Version="1.0.2" />
                    
Directory.Packages.props
<PackageReference Include="TrishkaV.EntityScribe" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add TrishkaV.EntityScribe --version 1.0.2
                    
#r "nuget: TrishkaV.EntityScribe, 1.0.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package TrishkaV.EntityScribe@1.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=TrishkaV.EntityScribe&version=1.0.2
                    
Install as a Cake Addin
#tool nuget:?package=TrishkaV.EntityScribe&version=1.0.2
                    
Install as a Cake Tool

EntityScribe

Library: Lightweight C# language extension to map objects and type from database reader executions, memory allocation is optimized for performance.

What to expect: Contains a collection of methods, async and with yield returns, to map database reads to objects and types.

add "using EntityScribe;" to enable the language extension, then on any sql command class that derives from "DbDataSource", e.g.: "using var cmd = SQLCommand.CreateCommand("SELECT * FROM users");"

call the mapping methods as: "List<User> users = await cmd.ReaderQueryAsync<User>();"

Examples: Entity mapper for database reader language extension.

Example: ".ReaderQueryAsync< int >()" returns a list of int, used with "SELECT n_size FROM items" where n_size is an integer. ".ReaderQueryAsync< (string, int) >()" returns a tuple of string and int, used with "SELECT c_name, n_size FROM items" where n_size is an integer and c_name is a string. ".ReaderQueryAsync< Item >()" returns a list of "Item" objects, the istances are mapped automatically. All methods have a non-async version eg ".ReaderQuery< int >()" which return an IEnumerable that can be collected into a list ".ToList()" or iterated over as it "yields" the results and is more comfortable for large number of rows.

NOTE Legally this comes with no warranty and you are using it at your own risk.

This library have been tested agaist real database extractions and objects of all the mentioned types its results hold correct.

If you find an issue with the results or implementation or an optimization could be made please feel free to contact me or issue a pull request. You will be credited for any contribution.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.2 331 4/22/2023
1.0.1 283 4/15/2023
1.0.0 322 4/11/2023