public virtual EmployeePayHistory MapBOToEF(
            BOEmployeePayHistory bo)
        {
            EmployeePayHistory efEmployeePayHistory = new EmployeePayHistory();

            efEmployeePayHistory.SetProperties(
                bo.BusinessEntityID,
                bo.ModifiedDate,
                bo.PayFrequency,
                bo.Rate,
                bo.RateChangeDate);
            return(efEmployeePayHistory);
        }
示例#2
0
        public void MapEFToBOList()
        {
            var mapper = new DALEmployeePayHistoryMapper();
            EmployeePayHistory entity = new EmployeePayHistory();

            entity.SetProperties(1, DateTime.Parse("1/1/1987 12:00:00 AM"), 1, 1m, DateTime.Parse("1/1/1987 12:00:00 AM"));

            List <BOEmployeePayHistory> response = mapper.MapEFToBO(new List <EmployeePayHistory>()
            {
                entity
            });

            response.Count.Should().Be(1);
        }
示例#3
0
        public void MapEFToBO()
        {
            var mapper = new DALEmployeePayHistoryMapper();
            EmployeePayHistory entity = new EmployeePayHistory();

            entity.SetProperties(1, DateTime.Parse("1/1/1987 12:00:00 AM"), 1, 1m, DateTime.Parse("1/1/1987 12:00:00 AM"));

            BOEmployeePayHistory response = mapper.MapEFToBO(entity);

            response.BusinessEntityID.Should().Be(1);
            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.PayFrequency.Should().Be(1);
            response.Rate.Should().Be(1m);
            response.RateChangeDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
        }