本文整理汇总了C#中DatabaseHelper.ReadAllGeneric方法的典型用法代码示例。如果您正苦于以下问题:C# DatabaseHelper.ReadAllGeneric方法的具体用法?C# DatabaseHelper.ReadAllGeneric怎么用?C# DatabaseHelper.ReadAllGeneric使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DatabaseHelper
的用法示例。
在下文中一共展示了DatabaseHelper.ReadAllGeneric方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RaspberryPiManager
public RaspberryPiManager()
{
dbHelper = new DatabaseHelper(DatabaseHelper._SQLitePlatformWinRT, DatabaseHelper.DB_PATH);
try
{
this.PiCatalog = dbHelper.ReadAllGeneric<RaspberryPiInfo>();
DefaultPi = PiCatalog.First(x => x.isDefault == true);
}
catch
{
}
isEditable = false;
}
示例2: SessionViewModel
public SessionViewModel()
{
Log = new ObservableCollection<LogMessage>();
PiInfo = new RaspberryPiInfo() { IpAddress = "192.168.1.2", Port = "5000" };
// ImageSource = new BitmapImage();
ImgHelper = new ImageHelper();
DbHelper = new DatabaseHelper(DatabaseHelper._SQLitePlatformWinRT, DatabaseHelper.DB_PATH);
try
{
ObservableCollection<RaspberryPiInfo> pis = DbHelper.ReadAllGeneric<RaspberryPiInfo>();
PiInfo = pis.First(x => x.isDefault);
}
catch
{
Log.Add(new LogMessage("No Default Pi is in the database please add one"));
}
// Image ImageHelper.ReadImageFromPi
}
示例3: NavigationRootPage_Loaded
async void NavigationRootPage_Loaded(object sender, RoutedEventArgs e)
{
// this.DataContext = this;
AddCustomTitleBar();
dbHelper = new DatabaseHelper(App.SQLITE_PLATFORM, App.DB_PATH);
this.Setups.MySetups = new ObservableCollection<UserGunSetup>(dbHelper.ReadAllGeneric<UserGunSetup>());
this.MyArmoryListView.ItemsSource = Setups.MySetups;
}