public Component MapToOrm(DalComponent entity)
 {
     return(new Component
     {
         id = entity.Id,
         name = entity.Name,
         pressmark = entity.Pressmark,
         template_id = entity.Template_id,
         industrialObject_id = entity.IndustrialObject_id
     });
 }
Esempio n. 2
0
        public LiteComponent MapDalToLiteBll(DalComponent entity)
        {
            LiteComponent bllEntity = new LiteComponent
            {
                Id                   = entity.Id,
                Name                 = entity.Name,
                Pressmark            = entity.Pressmark,
                TemplateName         = entity.Template_id != null?uow.Templates.Get(entity.Template_id.Value).Name                         : null,
                IndustrialObjectName = entity.IndustrialObject_id != null?uow.IndustrialObjects.Get(entity.IndustrialObject_id.Value).Name : null
            };

            return(bllEntity);
        }
Esempio n. 3
0
        public BllComponent MapToBll(DalComponent entity)
        {
            BllComponent bllEntity = new BllComponent
            {
                Id        = entity.Id,
                Name      = entity.Name,
                Pressmark = entity.Pressmark,
                Template  = entity.Template_id != null?templateService.Get((int)entity.Template_id) : null,
                                IndustrialObject = entity.IndustrialObject_id != null?industrialObjectService.Get((int)entity.IndustrialObject_id) : null
            };

            return(bllEntity);
        }