public ResourceContext(IOptions <MongoSettings> settings)
        {
            var client = new MongoClient(settings.Value.ConnectionString);

            client.Should().NotBeNull(MagpieStatics.SpecifiedArgumentShouldNotBeNull(nameof(settings)));

            this.database = client.GetDatabase(settings.Value.Database);
        }
예제 #2
0
        public ResourcesController(IResourceRepository resourceRepository)
        {
            resourceRepository.Should().NotBeNull(MagpieStatics.SpecifiedArgumentShouldNotBeNull(nameof(resourceRepository)));

            this.resourceRepository = resourceRepository;
        }