当前位置: 首页>>代码示例>>C#>>正文


C# SQLiteAsyncConnection.ExecuteAsync方法代码示例

本文整理汇总了C#中SQLite.SQLiteAsyncConnection.ExecuteAsync方法的典型用法代码示例。如果您正苦于以下问题:C# SQLiteAsyncConnection.ExecuteAsync方法的具体用法?C# SQLiteAsyncConnection.ExecuteAsync怎么用?C# SQLiteAsyncConnection.ExecuteAsync使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SQLite.SQLiteAsyncConnection的用法示例。


在下文中一共展示了SQLiteAsyncConnection.ExecuteAsync方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: update

        public async void update()
        {
            SQLiteAsyncConnection connection = new SQLiteAsyncConnection("Test.db");
            await connection.ExecuteAsync("UPDATE Employee SET Skill=\"" + Skill + "\" WHERE BadgeId=\"" + BadgeId+"\"");

            var addmsg = new MessageDialog("Your SkillSet has been updated!");
            await addmsg.ShowAsync();
        }
开发者ID:kashyapAkash,项目名称:Mueon,代码行数:8,代码来源:EmployeeViewModel.cs

示例2: ConnectionInit

 /// <summary>
 /// Initialise the Database connection and creates tables/default values if not existant.
 /// </summary>
 private async void ConnectionInit()
 {
     //Connection init
     var dbPath = Path.Combine(Windows.Storage.ApplicationData.Current.LocalFolder.Path, "db.sqlite");
     Database = new SQLite.SQLiteAsyncConnection(dbPath);
     //Create tables if not exists
     await Database.CreateTablesAsync(new Account().GetType(), new DatabaseRoute().GetType(), new DatabasePOI().GetType());
     await Database.ExecuteAsync("create table if not exists \"RouteBinds\"(\"RouteID\" integer,\"WaypointID\" integer);", new object[] { });
     //Set default Admin Admin password
     var result = await Database.ExecuteScalarAsync<String>("Select Gebruikersnaam From Account WHERE Gebruikersnaam = ? AND Password = ?", new object[] { "Admin", "Admin" });
     if(result == null)
         await Database.InsertAsync(new Account("Admin", "Admin"));
 }
开发者ID:Kraegon,项目名称:GTec,代码行数:16,代码来源:DatabaseConnector.cs

示例3: Clear

 public async Task Clear()
 {
     var connection = new SQLiteAsyncConnection(DbPath);
     await connection.ExecuteAsync("DELETE FROM TracklistItem");
 }
开发者ID:robUx4,项目名称:vlc-winrt,代码行数:5,代码来源:TracklistItemDatabase.cs

示例4: Remove

 public Task Remove(int trackId, int trackCollectionId)
 {
     var connection = new SQLiteAsyncConnection(DbPath);
     return connection.ExecuteAsync("DELETE FROM TracklistItem WHERE TrackCollectionId=? AND TrackId=?;", trackCollectionId, trackId);
 }
开发者ID:robUx4,项目名称:vlc-winrt,代码行数:5,代码来源:TracklistItemDatabase.cs

示例5: CreateTables

        /// <summary>
        /// Method to create tables into database.
        /// </summary>
        /// <param name="db">Database connection for async calls.</param>
        /// <returns><see cref="Task"/></returns>
        protected async Task CreateTables(SQLiteAsyncConnection db)
        {
            await Task.Run(async () =>
            {
                ///Tables:
                await db.CreateTableAsync<Zip>();


                await db.ExecuteAsync(string.Format("PRAGMA user_version = {0};", CURRENT_DB_VERSION));


            });
        }
开发者ID:Last-Mile-Health,项目名称:ODK-Liberia-LaptopTransfer,代码行数:18,代码来源:DatabaseContext.cs

示例6: RemoveLocation

        public Task RemoveLocation(MapLocationModel mapLocation)
        {
            SQLiteAsyncConnection connection = new SQLiteAsyncConnection(SQLiteConfiguration.ConnectionString);

            _locations.Remove(mapLocation);

            connection.ExecuteAsync("DELETE FROM MapLocationFolders WHERE MapLocationId = ?", mapLocation.ID);

            return connection.DeleteAsync(mapLocation);
        }
开发者ID:CasaTeam,项目名称:MetroExplorer,代码行数:10,代码来源:MapServiceSQLite.cs

示例7: RemoveLocationFolders

        public Task RemoveLocationFolders(List<MapLocationFolderModel> locationFolders)
        {
            string query = "DELETE FROM MapLocationFolders WHERE ID IN (" +
                locationFolders.Aggregate(string.Empty, (current, next) =>
                {
                    _locationFolders.Remove(next);
                    return current + "'" + next.ID + "',";
                }).TrimEnd(',') + ")";

            SQLiteAsyncConnection connection = new SQLiteAsyncConnection(SQLiteConfiguration.ConnectionString);

            return connection.ExecuteAsync(query);
        }
开发者ID:CasaTeam,项目名称:MetroExplorer,代码行数:13,代码来源:MapServiceSQLite.cs


注:本文中的SQLite.SQLiteAsyncConnection.ExecuteAsync方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。