TrishkaV.EntityScribe
1.0.2
dotnet add package TrishkaV.EntityScribe --version 1.0.2
NuGet\Install-Package TrishkaV.EntityScribe -Version 1.0.2
<PackageReference Include="TrishkaV.EntityScribe" Version="1.0.2" />
<PackageVersion Include="TrishkaV.EntityScribe" Version="1.0.2" />
<PackageReference Include="TrishkaV.EntityScribe" />
paket add TrishkaV.EntityScribe --version 1.0.2
#r "nuget: TrishkaV.EntityScribe, 1.0.2"
#:package TrishkaV.EntityScribe@1.0.2
#addin nuget:?package=TrishkaV.EntityScribe&version=1.0.2
#tool nuget:?package=TrishkaV.EntityScribe&version=1.0.2
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 | Versions 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. |
-
net6.0
- TrishkaV.TypeDetect (>= 1.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.