コード例 #1
0
 public ControlMethodsLib MapToOrm(DalControlMethodsLib entity)
 {
     return(new ControlMethodsLib
     {
         id = entity.Id
     });
 }
コード例 #2
0
        public BllControlMethodsLib MapToBll(DalControlMethodsLib entity)
        {
            BllControlMethodsLib bllEntity = new BllControlMethodsLib
            {
                Id = entity.Id
            };

            ControlService controlService = new ControlService(uow);

            foreach (var Control in uow.Controls.GetControlsByLibId(entity.Id))
            {
                bllEntity.Control.Add(controlService.Get(Control.Id));
            }
            return(bllEntity);
        }