Example #1
0
 /// <summary>
 /// 初始化数据库表
 /// </summary>
 /// <returns></returns>
 private async Task InitDBTableAsync()
 {
     //如果不存在sqlite数据库,则创建
     //TODO 其他数据源...
     if (driverDelegateType.Equals(typeof(SQLiteDelegate).AssemblyQualifiedName) ||
         driverDelegateType.Equals(typeof(MySQLDelegate).AssemblyQualifiedName) ||
         driverDelegateType.Equals(typeof(PostgreSQLDelegate).AssemblyQualifiedName))
     {
         IRepositorie repositorie = RepositorieFactory.CreateRepositorie(driverDelegateType, dbProvider);
         await repositorie?.InitTable();
     }
 }