I tried but it gives this error
Must declare the scalar variable "@imageid"
controller.cs
[HttpGet]
[Route("download/{id:int}")]
public String Getfiles(int imageid)
{
return _ShopDataProvider.DownloadImage(imageid);
}
class.cs
public String DownloadImage(int imageid)
{
using(IDbConnection dbConnection = Connection)
{
string sQuery0 = "SELECT path FROM Shop WHERE ShopId = @imageid";
dbConnection.Open();
String Path = dbConnection.QueryFirstOrDefault<String>(sQuery0, new { ShopId = imageid });
return Path;
}
}