public IList GetAllMenu()
{
using (IMMEntities context = new IMMEntities())
{
var menuList = from A in context.BASE_FUNCTION
join B in context.BASE_MENU on A.FUNCTION_ID equals B.FUNCTION_ID
select new MenuModel
{
Function = new FunctionModel() { FunctionId = A.FUNCTION_ID, FunctionName = A.FUNCTION_NAME },
MenuType = B.MENU_TYPE,
PicName = B.PIC_NAME,
MenuId = B.MENU_ID,
MenuName = B.MENU_NAME,
MenuStyleId = B.MENU_STYLEID,
ParentId = B.PARENT_ID,
Sort = B.SORT,
Status = B.STATUS
};
return menuList.ToList();
}
}
EF多表查询。↑
public int insertBussiness(CasePublicModel businessModel)
{
using (IMMEntities context = new IMMEntities())
{