Beispiel #1
0
        public virtual BOEmployee MapModelToBO(
            int businessEntityID,
            ApiEmployeeRequestModel model
            )
        {
            BOEmployee boEmployee = new BOEmployee();

            boEmployee.SetProperties(
                businessEntityID,
                model.BirthDate,
                model.CurrentFlag,
                model.Gender,
                model.HireDate,
                model.JobTitle,
                model.LoginID,
                model.MaritalStatu,
                model.ModifiedDate,
                model.NationalIDNumber,
                model.OrganizationLevel,
                model.Rowguid,
                model.SalariedFlag,
                model.SickLeaveHour,
                model.VacationHour);
            return(boEmployee);
        }
        public virtual BOEmployee MapEFToBO(
            Employee ef)
        {
            var bo = new BOEmployee();

            bo.SetProperties(
                ef.BusinessEntityID,
                ef.BirthDate,
                ef.CurrentFlag,
                ef.Gender,
                ef.HireDate,
                ef.JobTitle,
                ef.LoginID,
                ef.MaritalStatu,
                ef.ModifiedDate,
                ef.NationalIDNumber,
                ef.OrganizationLevel,
                ef.Rowguid,
                ef.SalariedFlag,
                ef.SickLeaveHour,
                ef.VacationHour);
            return(bo);
        }