SqlDataReaderMapper 1.0.4

Simple C# SqlDataReader object mapper. Allows you to map a SqlDataReader to the particular objects. Supports simple property mapping, property name transformations, string trimming, manual property binding by name, type changing, function binding, etc.

Install-Package SqlDataReaderMapper -Version 1.0.4
dotnet add package SqlDataReaderMapper --version 1.0.4
<PackageReference Include="SqlDataReaderMapper" Version="1.0.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SqlDataReaderMapper --version 1.0.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

SqlDataReader mapper

Simple C# SqlDataReader object mapper. Allows you to map a SqlDataReader to the particular objects.

Supports simple property mapping, property name transformations, string trimming, manual property binding by name, type changing, function binding, etc.

Installing SqlDataReaderMapper

You should install SqlDataReaderMapper:

PM> Install-Package SqlDataReaderMapper

Or via the .NET Core command line interface:

PM> dotnet add package SqlDataReaderMapper

Then, use the library in the project:

    using SqlDataReaderMapper;

Here is an example of the usage:

    var mappedObject = new SqlDataReaderMapper<DTOObject>(reader)
         .NameTransformers("_", "")
         .ForMember<int>("CurrencyId")
         .ForMember("CurrencyCode", "Code")
         .ForMember<string>("CreatedByUser", "User").Trim()
         .ForMemberManual("CountryCode", val => val.ToString().Substring(0, 10))
         .ForMemberManual("ZipCode", val => val.ToString().Substring(0, 5), "ZIP")
         .Build();

Or simply:

    var mappedObject = new SqlDataReaderMapper<DTOObject>(reader)
         .Build();

Either commands, from Package Manager Console or .NET Core CLI, will download and install SqlDataReaderMapper and all required dependencies.

Copyright

Copyright © 2019 Grigory and contributors.

License

SqlDataReaderMapper is licensed under GPL-3.0. Refer to LICENSE for more information.

What's next

I'm planning to make this library static.

SqlDataReader mapper

Simple C# SqlDataReader object mapper. Allows you to map a SqlDataReader to the particular objects.

Supports simple property mapping, property name transformations, string trimming, manual property binding by name, type changing, function binding, etc.

Installing SqlDataReaderMapper

You should install SqlDataReaderMapper:

PM> Install-Package SqlDataReaderMapper

Or via the .NET Core command line interface:

PM> dotnet add package SqlDataReaderMapper

Then, use the library in the project:

    using SqlDataReaderMapper;

Here is an example of the usage:

    var mappedObject = new SqlDataReaderMapper<DTOObject>(reader)
         .NameTransformers("_", "")
         .ForMember<int>("CurrencyId")
         .ForMember("CurrencyCode", "Code")
         .ForMember<string>("CreatedByUser", "User").Trim()
         .ForMemberManual("CountryCode", val => val.ToString().Substring(0, 10))
         .ForMemberManual("ZipCode", val => val.ToString().Substring(0, 5), "ZIP")
         .Build();

Or simply:

    var mappedObject = new SqlDataReaderMapper<DTOObject>(reader)
         .Build();

Either commands, from Package Manager Console or .NET Core CLI, will download and install SqlDataReaderMapper and all required dependencies.

Copyright

Copyright © 2019 Grigory and contributors.

License

SqlDataReaderMapper is licensed under GPL-3.0. Refer to LICENSE for more information.

What's next

I'm planning to make this library static.

Dependencies

This package has no dependencies.

GitHub repositories (0)

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.4 11,497 3/2/2019
1.0.2 226 2/12/2019