Esempio n. 1
0
        public DalCertificate MapToDal(BllCertificate entity)
        {
            DalCertificate dalEntity = new DalCertificate
            {
                Id             = entity.Id,
                CheckDate      = entity.CheckDate,
                Duration       = entity.Duration,
                Title          = entity.Title,
                ControlName_id = entity.ControlName != null ? entity.ControlName.Id : (int?)null,
                Employee_id    = entity.Employee != null ? entity.Employee.Id : (int?)null,
            };

            return(dalEntity);
        }
Esempio n. 2
0
        public BllCertificate MapToBll(DalCertificate entity)
        {
            if (entity != null)
            {
                BllCertificate bllEntity = new BllCertificate
                {
                    Id          = entity.Id,
                    CheckDate   = entity.CheckDate,
                    Duration    = entity.Duration,
                    Title       = entity.Title,
                    ControlName = entity.ControlName_id != null?controlNameService.Get((int)entity.ControlName_id) : null,
                                      Employee = entity.Employee_id != null?employeeService.Get((int)entity.Employee_id) : null
                };

                return(bllEntity);
            }
            return(null);
        }