https://github.com/andrewabest/Tailor
A set of opinionated Query abstractions and accompanying Convention Tests to make sure your Dapper queries measure up
https://github.com/andrewabest/Tailor
c-sharp dapper testing
Last synced: 5 months ago
JSON representation
A set of opinionated Query abstractions and accompanying Convention Tests to make sure your Dapper queries measure up
- Host: GitHub
- URL: https://github.com/andrewabest/Tailor
- Owner: andrewabest
- Created: 2017-06-29T01:01:26.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2024-01-16T19:34:17.000Z (over 2 years ago)
- Last Synced: 2025-12-18T14:41:32.098Z (6 months ago)
- Topics: c-sharp, dapper, testing
- Language: C#
- Size: 4.44 MB
- Stars: 14
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Tailor [](https://ci.appveyor.com/project/andrewabest/tailor) [](https://www.nuget.org/packages/Tailor/)
============
A set of opinionated Query abstractions and accompanying Convention Tests to make sure your Dapper queries measure up!
Tailor targets .NET Standard 2.0

## To install from NuGet
Install-Package Tailor
And then in your test project...
Install-Package Tailor.Test
## What is it?
A set of strongly typed query abstractions to encapsulate [Dapper](https://github.com/StackExchange/Dapper) queries and their parameters, that also allow us to enforce the following Conventions via [Conventional](https://github.com/andrewabest/Conventional)
* Queries *must* execute
* Query parameters *must* match SQL parameters
* Queries *must not* perform select-star
* Query parameters *must* have either a public default constructor, or one protected default constructor with public non-default constructors
## Why?
It isn't compile-time safety, but test-time safety is the next best thing. Ensures queries are resiliant to refactoring and schema changes.
## Examples
Check out the [Samples](https://github.com/andrewabest/Tailor/tree/master/Tailor.Tests/Sample) to get started
## License
Licensed under the terms of the [MS-PL](https://opensource.org/licenses/MS-PL) license