public ScheduleController(OneMoreContext context, IMailService mailService, IVKService vkService, ITelegramService telegramService) { _context = context; _mailService = mailService; _vkService = vkService; _telegramService = telegramService; }
public HomeController(OneMoreContext context) { _context = context; }
public MailService(OneMoreContext context) { _context = context; }
public TelegramService(IOptions <TelegramSettings> settings, OneMoreContext context) { _context = context; _settings = settings; _botClient = new TelegramBotClient(settings.Value.BotId); }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory, OneMoreContext context) { loggerFactory.AddConsole(Configuration.GetSection("Logging")); loggerFactory.AddDebug(); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); app.UseBrowserLink(); } else { app.UseExceptionHandler("/Home/Error"); } app.UseStaticFiles(); app.UseMvc(routes => { routes.MapRoute( name: "default", template: "{controller=Home}/{action=Index}/{id?}"); }); DbInitializer.Initialize(context); }
public VKService(IOptions <VKOptions> optionsAccessor, OneMoreContext context) { _options = optionsAccessor.Value; _context = context; }