SQLiteConnection Database = new SQLiteConnection(Constants.DatabasePath, Constants.Flags);
public class Location
{
public string LocationID { get; set; }
public string LocationName { get; set; }
}
List Locations = new List();
String loc = "1290";
Locations = Database.Query("Select * from Location where LocationID = "+loc).ToList();
// Event is a Picker
Event.ItemsSource = Locations;
Event.ItemDisplayBinding = new Binding("LocationName");
Как обрабатывать параметры SQL на Мауи вместо «Выбрать * из местоположения, где LocationID = «+loc
Я использую SQLight из этих пакетов. SQLite-net-pcl - 1.9.172 SQLitePCLRaw.bundle_green - 2.1.8 У меня работает следующее: [code]SQLiteConnection Database = new SQLiteConnection(Constants.DatabasePath, Constants.Flags);
public class Location { public string LocationID { get; set; } public string LocationName { get; set; } } List Locations = new List();
String loc = "1290"; Locations = Database.Query("Select * from Location where LocationID = "+loc).ToList();
// Event is a Picker Event.ItemsSource = Locations; Event.ItemDisplayBinding = new Binding("LocationName"); [/code] Как обрабатывать параметры SQL на Мауи вместо «Выбрать * из местоположения, где LocationID = «+loc