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); }
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); }