public CompanyService(ISportscardSystemDbContext dbContext, IMapper mapper) { Guard.WhenArgument(dbContext, "DbContext can not be null").IsNull().Throw(); Guard.WhenArgument(mapper, "Mapper can not be null").IsNull().Throw(); this.dbContext = dbContext; this.mapper = mapper; }
public ClientService(ISportscardSystemDbContext dbContext, IMapper mapper) { this.dbContext = dbContext ?? throw new ArgumentNullException("Context can't be null."); this.mapper = mapper ?? throw new ArgumentNullException("Mapper can't be null."); }