Ejemplo n.º 1
0
        /// <summary>
        /// 创建订阅者
        /// </summary>
        /// <returns></returns>
        public ActionResult CreateSubscribe()
        {
            var model = new RedisSubscriber();

            model.Id = TDemoTable.GetNewId().ToString();
            return(View(model));
        }
Ejemplo n.º 2
0
        public ActionResult Create()
        {
            var model = new TDemoTable();

            model.F_DateTime = DateTime.Now;
            model.F_Bool     = true;
            model.F_Float    = 0.01f;
            model.F_Int      = TDemoTable.GetNewId();
            model.F_BoolNull = true;
            model.CreateTime = DateTime.Now;
            return(View("Create", model));
        }
Ejemplo n.º 3
0
        public async Task <ActionResult> Create()
        {
            var model = new TDemoTable();

            model.F_DateTime = DateTime.Now;
            model.F_Bool     = true;
            model.F_Float    = 0.01f;
            model.F_Int      = 0;
            model.F_BoolNull = true;
            model.CreateTime = DateTime.Now;
            model.Id         = TDemoTable.GetNewId();

            var userlist = await PubSubRedis.Instance.GetAllSubscribeAsync();

            ViewBag.UserList = userlist.Select(item => new SelectListItem()
            {
                Text = item.Name, Value = item.Id
            });
            return(View(model));
        }