Esempio n. 1
0
        /// <summary>
        /// The constructor of the controller.
        /// </summary>
        /// <param name="context">The database to use</param>
        /// <param name="loggerArg">The logger to use</param>
        public EventController(TogepiContext context, ILogger <EventController> loggerArg)
        {
            // Saving the args
            dbContext = context;
            logger    = loggerArg;

            // Creating the SQL tables
            dbContext.Database.EnsureCreated();

            // Setting the API key
            apiKey = new HEREApp
            {
                AppId   = "nwVKikGG0miA826GlXkr",
                AppCode = "U_lOt-47GHaEnnNs34gJ6w"
            };
        }