Ejemplo n.º 1
0
 public static void PrintAllScores()
 {
     using (var db = new PoolManagerModel())
     {
         foreach (var account in db.PoolPlayerAccounts)
         {
             Console.WriteLine($"Player Name: {account.PoolPlayerName}, Score: {account.ScoreDifferential}");
         }
     }
 }
Ejemplo n.º 2
0
 public static void PrintPlayerAccount(string emailAddress)
 {
     using (var db = new PoolManagerModel())
     {
         foreach (var account in db.PoolPlayerAccounts.Where(a => a.EmailAddress == emailAddress))
         {
             Console.WriteLine($"Player Name: {account.PoolPlayerName}, Devils: {account.PredictedDevils}, Islanders: {account.PredictedIslanders}, Rangers: {account.PredictedRangers}, Flyers: {account.PredictedFlyers},");
         }
     }
 }
Ejemplo n.º 3
0
 public static PoolPlayerAccount CreateAccount(string poolPlayerName, string emailAddress, int predictedDevils, int predictedIslanders, int predictedRangers, int predictedFlyers)
 {
     using (var db = new PoolManagerModel())
     {
         var poolplayerAccount = new PoolPlayerAccount();
         poolplayerAccount.PoolPlayerName     = poolPlayerName;
         poolplayerAccount.EmailAddress       = emailAddress;
         poolplayerAccount.PredictedDevils    = predictedDevils;
         poolplayerAccount.PredictedIslanders = predictedIslanders;
         poolplayerAccount.PredictedRangers   = predictedRangers;
         poolplayerAccount.PredictedFlyers    = predictedFlyers;
         ///poolplayerAccount.PredictedPenguins = predictedPenguins;
         ///poolplayerAccount.PredictedBruins = predictedBruins;
         ///poolplayerAccount.PredictedSabres = predictedSabres;
         ///poolplayerAccount.PredictedCanadiens = predictedCanadiens;
         ///poolplayerAccount.PredictedSenators = predictedSenators;
         ///poolplayerAccount.PredictedLeafs = predictedLeafs;
         ///poolplayerAccount.PredictedThrashers = predictedThrashers;
         /// poolplayerAccount.PredictedHurricanes = predictedHurricanes;
         ///poolplayerAccount.PredictedPanthers = predictedPanthers;
         ///poolplayerAccount.PredictedLightning = predictedLightning;
         ///poolplayerAccount.PredictedCapitals = predictedCapitals;
         ///poolplayerAccount.PredictedBlackhawks = predictedBlackhawks;
         ///poolplayerAccount.PredictedBJackets = predictedBJackets;
         ///poolplayerAccount.PredictedRWings = predictedRWings;
         ///poolplayerAccount.PredictedPredators = predictedPredators;
         ///poolplayerAccount.PredictedBlues = predictedBlues;
         ///poolplayerAccount.PredictedFlames = predictedFlames;
         ///poolplayerAccount.PredictedAvalanche = predictedAvalanche;
         ///poolplayerAccount.PredictedOilers = predictedOilers;
         ///poolplayerAccount.PredictedWild = predictedWild;
         ///poolplayerAccount.PredictedCanucks = predictedCanucks;
         ///poolplayerAccount.PredictedDucks = predictedDucks;
         ///poolplayerAccount.PredictedStars = predictedStars;
         ///poolplayerAccount.PredictedKings = predictedKings;
         ///poolplayerAccount.PredictedCoyotes = predictedCoyotes;
         ///poolplayerAccount.PredictedSharks = predictedSharks;
         db.PoolPlayerAccounts.Add(poolplayerAccount);
         db.SaveChanges();
         return(poolplayerAccount);
     }
 }