Ejemplo n.º 1
0
        public async Task <DbConnection> OpenAsync()
        {
            if (string.IsNullOrEmpty(_connectionString) && _connectionStringFactory == null)
            {
                throw new ArgumentNullException($"Please construct {nameof(SqliteConnectionFactory)} with a connection string or factory to use parameterless OpenAsync");
            }

            var connectionString = string.IsNullOrEmpty(_connectionString) ? await _connectionStringFactory.GetConnectionStringAsync() : _connectionString;

            return(await OpenAsync(connectionString));
        }