Пример #1
0
 public DalComponent MapToDal(BllComponent entity)
 {
     return(new DalComponent
     {
         Id = entity.Id,
         Name = entity.Name,
         Pressmark = entity.Pressmark,
         Template_id = entity.Template != null ? entity.Template.Id : (int?)null,
         IndustrialObject_id = entity.IndustrialObject != null ? entity.IndustrialObject.Id : (int?)null
     });
 }
Пример #2
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);
        }