27 lines
641 B
C#
27 lines
641 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Dapper;
|
|
using System.Data;
|
|
using System.Data.SqlClient;
|
|
|
|
namespace marketconnectionNET
|
|
{
|
|
public class dataaccess
|
|
{
|
|
|
|
public List<cities> GetLocations(string LocationName)
|
|
{
|
|
using (IDbConnection connection = new System.Data.SqlClient.SqlConnection(helper.CnnVal("marketdb")))
|
|
{
|
|
|
|
var output = connection.Query<cities> ($"select * from cities where city_name = '{ LocationName }'").ToList();
|
|
return output;
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|