Ejemplo n.º 1
0
        /// <summary>
        /// 登录日志
        /// </summary>
        /// <returns></returns>
        public IActionResult Index()
        {
            var tenants = tenantManager.Tenants.ToList();
            var model   = new LoginLogViewModel()
            {
                Tenants = tenants.Select(x => new SelectListItem(x.Name, x.Id.ToString())).ToList()
            };

            return(View(model));
        }
Ejemplo n.º 2
0
        public bool Add(LoginLogViewModel model)
        {
            model.Id = Guid.NewGuid().ToString();
            LoginLog entity = new LoginLog();

            uow.Set <LoginLog>().Add(entity);
            entity.Id       = model.Id;
            entity.IP       = model.IP;
            entity.Place    = model.Place;
            entity.Result   = model.Result;
            entity.UserName = model.UserName;
            entity.Message  = model.Message;
            uow.Commit();
            return(true);
        }