public ServiceService(IOptions <DatabaseSettings> settings) { _settings = settings?.Value ?? throw new ArgumentNullException(nameof(settings)); _context = new BarbershopContext(_settings); _serviceRepository = new ServiceRepository(_context); }
public BaseRepository(IBarbershopContext context, String collectionName) { _context = context; _collection = String.IsNullOrEmpty(collectionName) ? throw new ArgumentNullException(nameof(collectionName)) : context.Database.GetCollection <TDocument>(collectionName); }
public ServiceRepository(IBarbershopContext context) : base(context, "Services") { }
public ServiceService(String connectionString, String database) { _context = new BarbershopContext(connectionString, database); }