Click here to Skip to main content
15,888,089 members
Articles / Programming Languages / C#

Some Extension Methods for SqlKata to Avoid Using Hardcoded Strings

Rate me:
Please Sign up or sign in to vote.
5.00/5 (5 votes)
8 Feb 2022CPOL 7.2K   2  
SqlKata is cool but having to use hardcoded strings for tables and fields in not my cup of tea.
SqlKata is useful for working with Dapper as I can write a fluent Linq-like syntax rather than hard-coding SQL statements. Unfortunately, SqlKata relies on hard-coded strings, so I implemented some extension methods to use explicit generic parameters instead.

Views

Daily Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect Interacx
United States United States
Blog: https://marcclifton.wordpress.com/
Home Page: http://www.marcclifton.com
Research: http://www.higherorderprogramming.com/
GitHub: https://github.com/cliftonm

All my life I have been passionate about architecture / software design, as this is the cornerstone to a maintainable and extensible application. As such, I have enjoyed exploring some crazy ideas and discovering that they are not so crazy after all. I also love writing about my ideas and seeing the community response. As a consultant, I've enjoyed working in a wide range of industries such as aerospace, boatyard management, remote sensing, emergency services / data management, and casino operations. I've done a variety of pro-bono work non-profit organizations related to nature conservancy, drug recovery and women's health.

Comments and Discussions