常用方法
常用方法
常用方法
常用方法
public ActionResult Join([FromQuery(Name = "id")] string roomId) { var playerId = HttpContext.Session.Id; if (storageService.AddPlayer(roomId, playerId)) { HttpContext.Session.SetString("roomName", roomId); HttpContext.Session.SetInt32("player", 2); return(Ok(roomId)); } return(BadRequest()); }