本文整理汇总了C#中SQLiteConnection.DropTable方法的典型用法代码示例。如果您正苦于以下问题:C# SQLiteConnection.DropTable方法的具体用法?C# SQLiteConnection.DropTable怎么用?C# SQLiteConnection.DropTable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SQLiteConnection
的用法示例。
在下文中一共展示了SQLiteConnection.DropTable方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DeleteAll
public void DeleteAll()
{
var sqlPath = Path.Combine(Windows.Storage.ApplicationData.Current.LocalFolder.Path, "StudentDB.sqlite");
using (SQLiteConnection conn = new SQLiteConnection(new SQLitePlatformWinRT(), sqlPath))
{
conn.DropTable<Student>();
conn.CreateTable<Student>();
conn.Dispose();
conn.Close();
}
}
示例2: ClearRemindItem
public static List<string> ClearRemindItem()
{
var conn = new SQLiteConnection(new SQLitePlatformWinRT(), App.RemindListDBPath);
var list = conn.Table<RemindListDB>();
List<string> TagList = new List<string>();
foreach (var item in list)
{
var itemList = item.Id_system.Split(',');
for (int i = 0; i < itemList.Count(); i++)
{
TagList.Add(itemList[i]);
}
}
//var TagList = from x in list where x.Id_system.Equals("") select x.Id_system;
conn.DropTable<RemindListDB>();
conn.CreateTable<RemindListDB>();
return TagList;
}
示例3: ClearRemindItem
public static List<string> ClearRemindItem()
{
var conn = new SQLiteConnection(new SQLitePlatformWinRT(), Path.Combine(ApplicationData.Current.LocalFolder.Path, "RemindList.db"));
//foreach (var item in list)
//{
// MyRemind temp = JsonConvert.DeserializeObject<MyRemind>(item.json);
// //getDetailClass(ref temp);
// temp.Tag = item.Id_system;
// temp.ClassDay = ClassMixDay(ref temp);
// if (visibility == Visibility.Visible)
// temp.Dot = Visibility.Collapsed;
// else
// temp.Dot = Visibility.Visible;
// temp.Rewrite = visibility;
// temp.DeleteIcon = visibility;
// App.remindList.Add(temp);
//}
var list = conn.Table<RemindListDB>();
List<string> TagList = new List<string>();
foreach (var item in list)
{
var itemList = item.Id_system.Split(',');
for (int i = 0; i < itemList.Count(); i++)
{
TagList.Add(itemList[i]);
}
}
//var TagList = from x in list where x.Id_system.Equals("") select x.Id_system;
conn.DropTable<RemindListDB>();
conn.CreateTable<RemindListDB>();
return TagList;
}