Пример #1
0
 private SEC002P001DTO GetByID(SEC002P001DTO dto)
 {
     dto.Model = _DBManger.VSMS_TITLE
                 .Where(m => m.TITLE_ID == dto.Model.TITLE_ID)
                 .FirstOrDefault().ToNewObject(new SEC002P001Model());
     return(dto);
 }
Пример #2
0
 private SEC002P001DTO GetAll(SEC002P001DTO 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 SEC002P001Model
     {
         TITLE_ID      = m.TITLE_ID,
         TITLE_NAME_TH = m.TITLE_NAME_TH,
         TITLE_NAME_EN = m.TITLE_NAME_EN
     }).ToList();
     return(dto);
 }
Пример #3
0
 public SEC002P001DA()
 {
     DTO = new SEC002P001DTO();
 }