Пример #1
0
        public ActionResult Edit(int id)
        {
            var role = Databases.CreateDatabase().GetRole(id);

            return(View(new RoleModel()
            {
                Id = role.Id, Name = role.Name
            }));
        }
Пример #2
0
        public ActionResult Edit(int id)
        {
            var user = Databases.CreateDatabase().GetUser(id);

            return(View(new UserModel()
            {
                Id = user.Id, Name = user.Name
            }));
        }
Пример #3
0
        public ActionResult Index()
        {
            var roles = from r in Databases.CreateDatabase().GetRoles()
                        select new RoleModel()
            {
                Id = r.Id, Name = r.Name
            };

            return(View(roles));
        }
Пример #4
0
        public ActionResult Index()
        {
            var users = from u in Databases.CreateDatabase().GetUsers()
                        select new UserModel()
            {
                Id = u.Id, Name = u.Name
            };

            return(View(users));
        }