public IEnumerable <VMenu> GetUserMenu(int UserID) { string sql = @"select m.MenuID,MenuTitle,MenuUrl,ParentID,m.Style from Sys_Menu m left join Sys_RoleMenu rm on m.MenuID = rm.MenuID left join Sys_UserRole ur on rm.RoleID=ur.RoleID left join Sys_UserInfo u on ur.UserID=u.UserID where u.UserID=@UserID "; return(_context.Query <VMenu>(sql, new { UserID = UserID })); }