Ejemplo n.º 1
0
        public virtual EventStatus MapBOToEF(
            BOEventStatus bo)
        {
            EventStatus efEventStatus = new EventStatus();

            efEventStatus.SetProperties(
                bo.Id,
                bo.Name);
            return(efEventStatus);
        }
Ejemplo n.º 2
0
        public void MapEntityToModel()
        {
            var         mapper = new DALEventStatusMapper();
            EventStatus item   = new EventStatus();

            item.SetProperties(1, "A");
            ApiEventStatusServerResponseModel response = mapper.MapEntityToModel(item);

            response.Id.Should().Be(1);
            response.Name.Should().Be("A");
        }
Ejemplo n.º 3
0
        public void MapEFToBO()
        {
            var         mapper = new DALEventStatusMapper();
            EventStatus entity = new EventStatus();

            entity.SetProperties(1, "A");

            BOEventStatus response = mapper.MapEFToBO(entity);

            response.Id.Should().Be(1);
            response.Name.Should().Be("A");
        }
Ejemplo n.º 4
0
        public virtual EventStatus MapModelToEntity(
            int id,
            ApiEventStatusServerRequestModel model
            )
        {
            EventStatus item = new EventStatus();

            item.SetProperties(
                id,
                model.Name);
            return(item);
        }
Ejemplo n.º 5
0
        public void MapEntityToModelList()
        {
            var         mapper = new DALEventStatusMapper();
            EventStatus item   = new EventStatus();

            item.SetProperties(1, "A");
            List <ApiEventStatusServerResponseModel> response = mapper.MapEntityToModel(new List <EventStatus>()
            {
                { item }
            });

            response.Count.Should().Be(1);
        }
Ejemplo n.º 6
0
        public void MapEFToBOList()
        {
            var         mapper = new DALEventStatusMapper();
            EventStatus entity = new EventStatus();

            entity.SetProperties(1, "A");

            List <BOEventStatus> response = mapper.MapEFToBO(new List <EventStatus>()
            {
                entity
            });

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