Example #1
0
        public async Task WriteSqlLiteFile()
        {
            var ddlResults = await
                             _daosqllite
                             .ExecDDLScriptsForTablesAsync(GetDbItemsTypes())
                             .ConfigureAwait(false);

            foreach (var res in ddlResults)
            {
                //Logger.Debug(res.Error, $"{(res.Error is null ? "Success:" : "Error:")} {res.Script.ScriptText}");
            }


            Actor[] resultActor = await _dao.GetAllItemsArrayAsync <Actor>();

            Film[] resultFilm = await _dao.GetAllItemsArrayAsync <Film>();

            Cast[] resultCast = await _dao.GetAllItemsArrayAsync <Cast>();

            await _daosqllite.WriteToServerAsync(resultActor);

            await _daosqllite.WriteToServerAsync(resultFilm);

            await _daosqllite.WriteToServerAsync(resultCast);
        }
Example #2
0
        public async Task CreateTables()
        {
            var ddlResults = await
                             _dao
                             .ExecDDLScriptsForTablesAsync(GetDbItemsTypes())
                             .ConfigureAwait(false);

            foreach (var res in ddlResults)
            {
                //Logger.Debug(res.Error, $"{(res.Error is null ? "Success:" : "Error:")} {res.Script.ScriptText}");
            }
            //await Dao.CreateTableAsync<TeamDbItem>(tableName: "NewTeams");
        }