public App() { MainRepository = new EFMainRepository(); AuctionRunner = new AuctionRunner(MainRepository); this.AuctionRunner.Start(); InitializeTestData(); }
public IMainRepository CreateMainRepository() { if (instance == null) { instance = new EFMainRepository(); } return(instance); }
public AuctionController() { var repo = new EFMainRepository(); this.memberService = new SimpleMemberService(repo); this.auctionService = new AuctionService(repo, this.memberService); }
public IMainRepository CreateMainRepository() { var repo = new EFMainRepository(); if (!this.repos.Any()) { repo.Database.Delete(); } this.repos.Add(repo); return(repo); }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); RouteConfig.RegisterRoutes(RouteTable.Routes); // DotNetBay startup var mainRepository = new EFMainRepository(); mainRepository.SaveChanges(); AuctionRunner = new AuctionRunner(mainRepository); AuctionRunner.Start(); }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); RouteConfig.RegisterRoutes(RouteTable.Routes); // DotNetBay startup var mainRepository = new EFMainRepository(); mainRepository.SaveChanges(); // SignalR Configuration var serializerSettings = new JsonSerializerSettings(); serializerSettings.ReferenceLoopHandling = ReferenceLoopHandling.Serialize; serializerSettings.PreserveReferencesHandling = PreserveReferencesHandling.Objects; var serializer = JsonSerializer.Create(serializerSettings); GlobalHost.DependencyResolver.Register(typeof(JsonSerializer), () => serializer); AuctionRunner = new AuctionRunner(mainRepository); AuctionRunner.Auctioneer.BidAccepted += (sender, args) => #pragma warning disable SA1501 // Statement must not be on a single line { AuctionsHub.NotifyBidAccepted(args.Auction, args.Bid); }; AuctionRunner.Auctioneer.BidDeclined += (sender, args) => { AuctionsHub.NotifyBidDeclined(args.Auction, args.Bid); }; AuctionRunner.Auctioneer.AuctionStarted += (sender, args) => { AuctionsHub.NotifyAuctionStarted(args.Auction); }; AuctionRunner.Auctioneer.AuctionEnded += (sender, args) => { AuctionsHub.NotifyAuctionEnded(args.Auction); }; #pragma warning restore SA1501 // Statement must not be on a single line AuctionRunner.Start(); }
public AuctionsController() { this.mainRepository = new EFMainRepository(); this.service = new AuctionService(this.mainRepository, new SimpleMemberService(this.mainRepository)); }
public HealthMiddleware(OwinMiddleware next, string route) : base(next) { this.route = route; repository = new EFMainRepository(); }
public IMainRepository CreateMainRepository() { repository = new EFMainRepository(); return(repository); }
public RemoteAuctionService() { this.repository = new EFMainRepository(); }
public HealthMiddleware(OwinMiddleware next) : base(next) { this.repository = new EFMainRepository(); }
public AuctionController() { repository = new EFMainRepository(); service = new AuctionService(repository, new SimpleMemberService(repository)); }