Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vborovikov/spryer
Enum mapping for Dapper and more
https://github.com/vborovikov/spryer
csharp dapper dapper-extensions dapper-orm dotnet enums
Last synced: about 2 months ago
JSON representation
Enum mapping for Dapper and more
- Host: GitHub
- URL: https://github.com/vborovikov/spryer
- Owner: vborovikov
- License: mit
- Created: 2023-03-20T14:11:11.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-24T19:56:44.000Z (2 months ago)
- Last Synced: 2024-10-25T22:07:09.972Z (2 months ago)
- Topics: csharp, dapper, dapper-extensions, dapper-orm, dotnet, enums
- Language: C#
- Homepage:
- Size: 46.9 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Spryer
Enum mapping for Dapper and more[![Downloads](https://img.shields.io/nuget/dt/Spryer.svg)](https://www.nuget.org/packages/Spryer)
[![NuGet](https://img.shields.io/nuget/v/Spryer.svg)](https://www.nuget.org/packages/Spryer)
[![MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/vborovikov/spryer/blob/main/LICENSE)The project provides a set of utility classes and extension methods, including the `DbEnum` and `DapperExtensions` classes.
## DbEnum
The `DbEnum` class is a generic wrapper around C# enumerations that provides support for storing enum values in a database. It includes methods for converting between enum values and database values, and for serializing and deserializing enum values.Before using the `DbEnum` class, you must enable its support in Dapper by calling a `DbEnum.Initialize()` method, usually during your application startup.
## DapperExtensions
The `DapperExtensions` class provides a set of extension methods for converting strings to different types of database strings, and for converting enum values to `DbEnum` instances.