예제 #1
0
        /// <summary>
        /// Gets the user repository.
        /// </summary>
        /// <returns>Task{IUserRepository}.</returns>
        private async Task <IUserRepository> GetUserRepository()
        {
            var repo = new SqliteUserRepository(JsonSerializer, LogManager, ApplicationPaths);

            await repo.Initialize().ConfigureAwait(false);

            return(repo);
        }
예제 #2
0
        private async Task <IUserRepository> GetUserRepository()
        {
            var dbFile = Path.Combine(ApplicationPaths.DataPath, "users.db");

            var connection = await ConnectToDb(dbFile).ConfigureAwait(false);

            var repo = new SqliteUserRepository(connection, JsonSerializer, LogManager);

            repo.Initialize();

            return(repo);
        }