コード例 #1
0
        void MultiTest()
        {
            MuxClass muxclass = new MuxClass();
            Car      car      = new Car
            {
                Id          = 1,
                Title       = "测试",
                Description = "test"
            };

            muxclass.Car  = car;
            muxclass.Make = new Make()
            {
                Id   = 1,
                Name = "cgyqu"
            };
            redisClient.Set <MuxClass>("muxClass", muxclass);
            var mux = redisClient.Get <MuxClass>("muxClass");

            Console.WriteLine(mux.Car.Description + mux.Make.Name);
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: cgyqu/RedisDemo
 void MultiTest()
 {
     MuxClass muxclass = new MuxClass();
     Car car = new Car
     {
         Id = 1,
         Title = "测试",
         Description = "test"
     };
     muxclass.Car = car;
     muxclass.Make = new Make()
     {
         Id = 1,
         Name = "cgyqu"
     };
     redisClient.Set<MuxClass>("muxClass", muxclass);
     var mux = redisClient.Get<MuxClass>("muxClass");
     Console.WriteLine(mux.Car.Description + mux.Make.Name);
 }