How do I build a dynamic Where clause with Dapper when passing in a model
You can also use Dapper’s SqlBuilder. Note that you’ll have to install the Dapper.SqlBuilder NuGet package since it doesn’t come with Dapper’s main distribution. Here is an example: [Test] public void Test() { var model = new PersonModel {FirstName = “Bar”, City = “New York”}; var builder = new SqlBuilder(); //note the ‘where’ in-line comment … Read more