Esempio n. 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);
        }
Esempio n. 2
0
        public async Task WriteSqlServer()
        {
            await DropTables();
            await CreateTables();



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

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

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

            await _dao.WriteToServerAsync(resultActor);

            await _dao.WriteToServerAsync(resultFilm);

            await _dao.WriteToServerAsync(resultCast);
        }