Exemplo n.º 1
0
 public BeerService(IBeerRepository beerRepository, IBrandRepository brandRepository, IBeerTypeRepository typeRepository, IValidator validator)
 {
     this.BeerRepository  = beerRepository ?? throw new NullReferenceException("Repository can't be null");
     this.BrandRepository = brandRepository ?? throw new NullReferenceException("Repository can't be null");
     this.TypeRepository  = typeRepository ?? throw new NullReferenceException("Repository can't be null");
     this.Validator       = validator ?? throw new NullReferenceException("Validator can't be null");
 }
Exemplo n.º 2
0
 public BeerTypeManager()
 {
     _repository = new BeerTypeRepository();
 }