Пример #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="GTSportStatisticService"/> class.
        /// </summary>
        /// <param name="npgsqlConnection">The NPGSQL connection.</param>
        /// <exception cref="ArgumentNullException">npgsqlConnection</exception>
        public GTSportStatisticService(NpgsqlConnection npgsqlConnection)
        {
            this.npgsqlConnection = npgsqlConnection ?? throw new ArgumentNullException(nameof(npgsqlConnection));

            ownerCarsRepository = new OwnerCarsRepository(npgsqlConnection);
            carsRepository      = new CarsRepository(npgsqlConnection);
        }
 /// <summary>Initializes a new instance of the <see cref="OwnerCarValidation"/> class.</summary>
 /// <param name="npgsqlConnection">The NPGSQL connection.</param>
 public OwnerCarValidation(NpgsqlConnection npgsqlConnection) : base(npgsqlConnection)
 {
     ownersRepository    = new OwnersRepository(npgsqlConnection);
     carsRepository      = new CarsRepository(npgsqlConnection);
     ownerCarsRepository = new OwnerCarsRepository(npgsqlConnection);
 }