コード例 #1
0
        public virtual DeploymentRelatedMachine MapBOToEF(
            BODeploymentRelatedMachine bo)
        {
            DeploymentRelatedMachine efDeploymentRelatedMachine = new DeploymentRelatedMachine();

            efDeploymentRelatedMachine.SetProperties(
                bo.DeploymentId,
                bo.Id,
                bo.MachineId);
            return(efDeploymentRelatedMachine);
        }
コード例 #2
0
        public void MapEFToBO()
        {
            var mapper = new DALDeploymentRelatedMachineMapper();
            DeploymentRelatedMachine entity = new DeploymentRelatedMachine();

            entity.SetProperties("A", 1, "A");

            BODeploymentRelatedMachine response = mapper.MapEFToBO(entity);

            response.DeploymentId.Should().Be("A");
            response.Id.Should().Be(1);
            response.MachineId.Should().Be("A");
        }
コード例 #3
0
        public void MapEFToBOList()
        {
            var mapper = new DALDeploymentRelatedMachineMapper();
            DeploymentRelatedMachine entity = new DeploymentRelatedMachine();

            entity.SetProperties("A", 1, "A");

            List <BODeploymentRelatedMachine> response = mapper.MapEFToBO(new List <DeploymentRelatedMachine>()
            {
                entity
            });

            response.Count.Should().Be(1);
        }