//string sqlFormattedDate = myDateTime.ToString("yyyy-MM-dd HH:mm:ss.fff"); public GlobalGameStats() { this._repo = new GenericRespository(_db); this.globalStats = this.LoadGlobalStats(); if (globalStats == null) { globalStats = new GlobalGameStatsView(); } this.PlayerWithMostWins = globalStats.PlayerWithMostWins; this.PlayerWithMostWinsId = globalStats.PlayerWithMostWinsId; this.MostWins = globalStats.MostWins.ToString(); // Overhere this.PlayerWithMostGames = globalStats.PlayerWithMostGames; this.PlayerWithMostGamesId = globalStats.PlayerWithMostGamesId; this.MostGames = globalStats.MostGamesPlayed.ToString(); this.GameWithLongestVolleyHits = globalStats.GameWithLongestVolleyHits; this.Player1GameWithLongestVolleyHits = globalStats.Player1GameWithLongestVolleyHits; this.Player1GameWithLongestVolleyHitsId = globalStats.Player1GameWithLongestVolleyHitsId; this.Player2GameWithLongestVolleyHits = globalStats.Player2GameWithLongestVolleyHits; this.Player2GameWithLongestVolleyHitsId = globalStats.Player2GameWithLongestVolleyHitsId; this.LongestVolleyHits = globalStats.LongestVolleyHits.ToString(); this.GameWtihLongestVolleyTime = globalStats.GameWithLongestVolleyTime; this.Player1GameWithLongestVolleyTime = globalStats.Player1GameWithLongestVolleyTime; this.Player1GameWithLongestVolleyTimeId = globalStats.Player1GameWithLongestVolleyHitsId; this.Player2GameWithLongestVolleyTime = globalStats.Player2GameWithLongestVolleyTime; this.Player2GameWithLongestVolleyTimeId = globalStats.Player2GameWithLongestVolleyTimeId; this.LongestVolleyTime = globalStats.LongestVolleyTime.ToString("0.##"); this.PlayerWithBestWinRatio = globalStats.PlayerWithBestWinRatio; this.PlayerWithBestWinRatioId = globalStats.PlayerWithBestWinRatioId; this.BestWinRatio = globalStats.BestWinRatio.ToString("0.##"); this.PlayerWithGreatestAvgPointSpreadWins = globalStats.PlayerWithGreatestAvgPointSpreadWins; this.PlayerWithGreatestAvgPointSpreadWinsId = globalStats.PlayerWithGreatestAvgPointSpreadWinsId; this.BestAvgPointSpreadWins = globalStats.BestAvgPointSpreadWins.ToString("0.##"); this.PlayerWithLeastAvgPointSpreadLosses = globalStats.PlayerWithLeastAvgPointSpreadLosses; this.PlayerWithLeastAvgPointSpreadLossesId = globalStats.PlayerWithLeastAvgPointSpreadLossesId; this.LeastAvgPointSpreadLosses = globalStats.LeastAvgPointSpreadLosses.ToString("0.##"); }
static void Main(string[] args) { ProcessPearson processPearson = new ProcessPearson(); IPerson person = new Person() { Name = "Erick" }; person.Run(); StaticPerson.Run(); processPearson.ProcessNameWithoutReference(person); Console.WriteLine(person.Name); RunDelegate(new MyDelegate(processPearson.MyMethodOne), 2); RunDelegate(new MyDelegate(processPearson.MyMethodTwo), 33); person = new Humman(); person.Run(); //ProductRespository productRespository = new ProductRespository(); GenericRespository <Product> productRespository = new GenericRespository <Product>(); productRespository.Insert(new Product { ProductId = 1, Description = "Teclado" }); Product mouse = new Product { ProductId = 2, Description = "Mouse" }; productRespository.Insert(mouse); Product monitor = new Product { ProductId = 3, Description = "Monitor" }; productRespository.Insert(monitor); productRespository.Update(monitor, new Product { ProductId = 3, Description = "Monitor V2" }); productRespository.Delete(mouse); List <Product> products = productRespository.List(); GenericRespository <Customer> customerRespository = new GenericRespository <Customer>(); Customer customer = new Customer { CustomerId = 1, Name = "Erick", Lastname = "Aróstegui" }; customerRespository.Insert(customer); List <Customer> customers = customerRespository.List(); GenericRespository <Sale> saleRespository = new GenericRespository <Sale>(); Sale sale = new Sale { Id = 1, Description = "Venta de Laptop", Total = 2500 }; saleRespository.Insert(sale); List <Sale> sales = saleRespository.List(); saleRespository.DoWork <Customer>(sale, customer); ProductRunnerService productRunnerService = new ProductRunnerService(); productRunnerService.Run(); CustomerRunnerService customerRunnerService = new CustomerRunnerService(); customerRunnerService.Run(); }
public HitLocationService() { this._repo = new GenericRespository(_db); }
public GamePlayerService() { this._repo = new GenericRespository(_db); }