public bool Start(HostControl hostControl) { _usageInspectionRepository = PlumbingFactory.GetContainer().Resolve <UsageInspectionRepository>(); var abc = _usageInspectionRepository.GetUsageHistory(); return(true); }
static void Main(string[] args) { PlumbingFactory.Register(); HostFactory.Run(x => { x.UseAutofacContainer(PlumbingFactory.GetContainer()); x.Service <UsageInspection>(); x.RunAsLocalSystem(); x.StartAutomatically(); //x.SetDescription(Settings.Default.ServiceDescription); //x.SetDisplayName(Settings.Default.ServiceDisplayName); //x.SetServiceName(Settings.Default.ServiceName); }); }