public bool AddMyPoker([FromServices] IPokerService PokerService, string pokerId) { var userId = HttpContext.Session.GetString("UserId"); var result = PokerService.AddMyPoker(pokerId, userId); return(result); }
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); } }