protected override void OnStart(string[] args) { var sqlConnectionString = ConfigurationManager.AppSettings["SqlConnectionString"]; var rabbitMqConnectionString = ConfigurationManager.AppSettings["RabbitMqConnectionString"]; _context = new EmpiriCallDbContext(new SqlConnection(sqlConnectionString)); using (var bus = RabbitHutch.CreateBus(rabbitMqConnectionString)) { bus.Subscribe <QueueMessage>("EmpiriCallQueueMessage", SaveRecordToDatabase); if (_showConsole) { Console.WriteLine("Now listening for messages of type: " + typeof(QueueMessage).FullName); Console.WriteLine("Press ENTER to stop."); Console.ReadLine(); } } base.OnStart(args); }
public QueryHandlerGetLatestMetaData(EmpiriCallDbContext context) { _context = context; }
public CommandHandlerAddRecord(EmpiriCallDbContext context) { _context = context; }
public CommandHandlerMapFeature(EmpiriCallDbContext context) { _context = context; }
public CommandHandlerAddNewMetaDataVersion(EmpiriCallDbContext context) { _context = context; }
public CommandHandlerUpdateFeatures(EmpiriCallDbContext context) { _context = context; }
public CommandHandlerCreateMetaDataIfNecessary(EmpiriCallDbContext context) { _context = context; }
public QueryHandlerRawDetail(EmpiriCallDbContext context) { _context = context; }