コード例 #1
0
        //public static void Initialize(IServiceProvider serviceProvider)
        //{

        //}
        public AuthController(UserManager <UserIdentity> userManager, TravelManagerContext context, IJwtFactory jwtFactory, IOptions <JwtIssuerOptions> jwtOptions)
        {
            _userManager = userManager;
            _context     = context;
            _jwtFactory  = jwtFactory;
            _jwtOptions  = jwtOptions.Value;
        }
コード例 #2
0
        public ExchangeRateProvider(TravelManagerContext context, IConfiguration configuration, ILogger <ExchangeRateProvider> logger)
        {
            _context       = context;
            _configuration = configuration;
            BaseEndpoint   = new Uri(_configuration.GetValue <string>("ExchangeRatesAPIurl"), UriKind.Absolute);

            _httpClient = new HttpClient();
            _logger     = logger;
            _logger.LogInformation($"LOG: ExchangeRateProvider created");
            _logger.LogInformation($"LOG: BaseEndpoint: {BaseEndpoint}");
        }
コード例 #3
0
        public CurrenciesController(TravelManagerContext context)
        {
            _context = context;
            if (_context.Currencies.Count() == 0)
            {
                // Create a new Currency if collection is empty,

                _context.Currencies.Add(new Currency {
                    Name = "USD", Description = "US dollar", Symbol = "$"
                });
                _context.SaveChanges();
            }
        }
コード例 #4
0
 public UserTestController(UserManager <UserIdentity> userManager, TravelManagerContext context)
 {
     _userManager = userManager;
     _context     = context;
 }
コード例 #5
0
 public PlacesController(TravelManagerContext context)
 {
     _context = context;
 }
コード例 #6
0
 public RoleAsigneesController(TravelManagerContext context)
 {
     _context = context;
 }
コード例 #7
0
 public CurrencyConverter(TravelManagerContext context)
 {
     _context = context;
 }
コード例 #8
0
 public EmployeesController(TravelManagerContext context)
 {
     _context = context;
 }
コード例 #9
0
 public ExchangeRatesController(TravelManagerContext context)
 {
     _context = context;
 }
コード例 #10
0
 public DocumentsController(TravelManagerContext context)
 {
     _context = context;
 }
コード例 #11
0
 public UsersController(TravelManagerContext context)
 {
     _context = context;
 }