private SECS02P003DTO GetByID(SECS02P003DTO dto) { dto.Model = _DBManger.VSMS_TITLE .Where(m => m.TITLE_ID == dto.Model.TITLE_ID) .FirstOrDefault().ToNewObject(new SECS02P003Model()); return(dto); }
private SECS02P003DTO GetAll(SECS02P003DTO dto) { dto.Models = _DBManger.VSMS_TITLE .Where(m => ((dto.Model.TITLE_NAME == null || dto.Model.TITLE_NAME == string.Empty) || m.TITLE_NAME_TH.Contains(dto.Model.TITLE_NAME) || m.TITLE_NAME_EN.Contains(dto.Model.TITLE_NAME))) .OrderBy(m => new { m.TITLE_NAME_TH, m.TITLE_NAME_EN }) .Select(m => new SECS02P003Model { TITLE_ID = m.TITLE_ID, TITLE_NAME_TH = m.TITLE_NAME_TH, TITLE_NAME_EN = m.TITLE_NAME_EN }).ToList(); return(dto); }
public SECS02P003DA() { DTO = new SECS02P003DTO(); }