Пример #1
0
        /// <summary>
        /// Tries the create table.
        /// </summary>
        /// <param name="dbTable">The db table.</param>
        /// <param name="databaseName"></param>
        /// <returns>A ValueTask.</returns>
        public static async Task <int> TryCreateTableAsync <T>(this DbTable dbTable, string databaseName)
        {
            var exist = await dbTable.IsExistTableAsync <T>(databaseName);

            if (!exist)
            {
                return(await dbTable.CreateTableAsync <T>(databaseName));
            }
            return(-1);
        }