Skip to content
Advertisement

Select statement: Invalid column name, in C# using Dapper [closed]

Here is the model class for my database

And here is the main class

I want to select records based on last name I have a row having david as last name but when ever I type david in textbox and search I get this error

Invalid column name david

Advertisement

Answer

deleted the answer since it creates a risk of sql injection ; see the other answer instead.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement