private async Task CreateTables()
        {
            await database.CreateTableAsync <WeekSchedule>();

            await database.CreateTableAsync <Week>();

            await database.CreateTableAsync <Day>();

            await database.CreateTableAsync <Lesson>();

            await database.CreateTableAsync <TypeObj>();

            await database.CreateTableAsync <Group>();

            await database.CreateTableAsync <Faculty>();

            await database.CreateTableAsync <Teacher>();

            await database.CreateTableAsync <Auditory>();

            await database.CreateTableAsync <Building>();
        }
Ejemplo n.º 2
0
        private async Task<Repository> InitializeAsync(string dbPath, INetworkChecker checker, ISettingsProvider settings)
        {
            database = new SQLiteDatabase(dbPath);

            await database.CreateTableAsync<WeekRoot>();
            await database.CreateTableAsync<Week>();
            await database.CreateTableAsync<Day>();
            await database.CreateTableAsync<Lesson>();
            await database.CreateTableAsync<TypeObj>();
            await database.CreateTableAsync<Group>();
            await database.CreateTableAsync<Faculty>();
            await database.CreateTableAsync<Teacher>();
            await database.CreateTableAsync<Auditory>();
            await database.CreateTableAsync<Building>();
         
            this.checker = checker;
            this.settings = settings;
            client = new HttpClient();

            await RemoveExpiredWeeksAsync();
            return this;
        }