Exemplo n.º 1
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);
     }
 }
Exemplo n.º 2
0
        public IEnumerable <myPoker> GetMyAll([FromServices] IPokerService PokerService)
        {
            var userId = HttpContext.Session.GetString("UserId");

            return(PokerService.GetMyAll(userId));
        }