public List <RoleMenuViewModel> MenuReportByRole(int roleid) { using (SATEntities db = new SATEntities()) { var data = db.sp_Menu_GetByRole(roleid, "R").Select(s => new RoleMenuViewModel() { RoleID = s.RoleID, MenuID = (int)s.MenuID, MenuName = s.MenuName, ParentID = s.ParentID, R_View = s.R_View ?? false, R_Add = s.R_Add ?? false, R_Edit = s.R_Edit ?? false, R_Delete = s.R_Delete ?? false, }).ToList(); return(data); } }