Exemple #1
0
        public bool AddMyPoker([FromServices] IPokerService PokerService, string pokerId)
        {
            var userId = HttpContext.Session.GetString("UserId");
            var result = PokerService.AddMyPoker(pokerId, userId);

            return(result);
        }
Exemple #2
0
 public bool Login([FromServices] IPokerService PokerService, string UserId)
 {
     try
     {
         HttpContext.Session.SetString("UserId", UserId);
         var poker = PokerService.GetMyAll(UserId);
         if (poker.Count() == 0)
         {
             PokerService.AddMyPoker("3", UserId);
         }
         return(true);
     }
     catch
     {
         return(false);
     }
 }