public object GetGridDetailData(string unitSeq, string busiSeq) { return(db.JoinQuery <TBusinessAttributeModel, TUnitModel, TBusinessModel>((m, u, b) => new object[] { JoinType.LeftJoin, m.unitSeq == u.unitSeq, JoinType.LeftJoin, m.busiSeq == b.busiSeq && m.unitSeq == b.unitSeq }) .Where((m, u, b) => m.unitSeq == unitSeq && m.busiSeq == busiSeq) .Select((m, u, b) => new { m.id, u.unitSeq, u.unitName, b.busiSeq, b.busiCode, b.busiName, m.timeInterval, m.ticketRestriction, m.lineUpMax, m.lineUpWarningMax, m.ticketPrefix, isGreenChannel = m.isGreenChannel == 1 ? "是" : "否", m.remark, Model = m }) .OrderBy(k => k.id) .ToList()); }