Exemplo n.º 1
0
        public ActionResult Index()
        {
            var something = new SomethingToStore(_i, "Hello");

            var command = _connectionFactory.GetConnection();

            command
                .SetUrn(UrnPrefix)
                .RedisString()
                .AsType<SomethingToStore>()
                .Set(something);

            var model = _connectionFactory.GetConnection().RedisString().AsType<SomethingToStore>().SetUrn(UrnPrefix).Get();

            return View(model);
        }
Exemplo n.º 2
0
        public ActionResult Index(string q)
        {
            ++_i;
            var something = new SomethingToStore(_i, q);

            var command = _connectionFactory.GetConnection();

            command
                .SetUrn(string.Format(@"{0}{1}", UrnPrefix, _i))
                .RedisString()
                .AsType<SomethingToStore>()
                .Set(something);

            var model = _connectionFactory.GetConnection().RedisString().AsType<SomethingToStore>().SetUrn(string.Format(@"{0}{1}", UrnPrefix, _i)).Get();

            return View(model);
        }