コード例 #1
0
        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;
        }
コード例 #2
0
 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.");
 }