public CommonResponse ItemGet(ReqItemGet req) //세션키를 이용해서 아이템을 받아옴 { int accountID = Convert.ToInt32(RedisProvider.GetSession(req.sessionKey)); using (var db = DatabaseContext.Open()) { using (var read = db.ExecuteQuery($"Select * from t_inventory Where accountIDx = {accountID}")) { } // "SELECT * FROM t_inventory a Join t_time b ON a.itemID = b.itemID"; } //using (var db = ORMContext.Open()) //{ // var query = db.From<t_inventory>().Join<t_item>((x, y) => x.itemID == y.itemID).Where(w => w.accountIdx == accountID); // var rows = db.Select(query); // List<int> list = new List<int> { 101,102}; // db.Select<t_inventory> //} return(Response(ResultCode.OK)); }
private void PrepareTest() { AuthCommand auth = new AuthCommand(); ReqAuth req = new ReqAuth(); req.accountKey = "test"; req.authType = AuthType.Guest; var reqAuth = auth.Auth(req) as ResAuth; ReqItemGet reqItemGet = new ReqItemGet(); reqItemGet.sessionKey = reqAuth.sessionKey; auth.ItemGet(reqItemGet); }