예제 #1
0
        //GET DETAIL Role
        public static RoleViewModel GetDetailRoleById(int paramRoleId)
        {
            RoleViewModel result = new RoleViewModel();

            using (var db = new MarkomApplicationDBEntities())
            {
                var res = db.spRoleDetailByID(paramRoleId);

                result = res.Select(c => new RoleViewModel
                {
                    id          = c.id,
                    code        = c.code,
                    name        = c.name,
                    description = c.description
                }).FirstOrDefault();
            }

            return(result);
        }