예제 #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);
 }