Exemplo n.º 1
0
        public virtual ApiDeviceResponseModel MapBOToModel(
            BODevice boDevice)
        {
            var model = new ApiDeviceResponseModel();

            model.SetProperties(boDevice.Id, boDevice.Name, boDevice.PublicId);

            return(model);
        }
Exemplo n.º 2
0
        public virtual BODevice MapEFToBO(
            Device ef)
        {
            var bo = new BODevice();

            bo.SetProperties(
                ef.Id,
                ef.Name,
                ef.PublicId);
            return(bo);
        }
Exemplo n.º 3
0
        public virtual Device MapBOToEF(
            BODevice bo)
        {
            Device efDevice = new Device();

            efDevice.SetProperties(
                bo.Id,
                bo.Name,
                bo.PublicId);
            return(efDevice);
        }
Exemplo n.º 4
0
        public virtual BODevice MapModelToBO(
            int id,
            ApiDeviceRequestModel model
            )
        {
            BODevice boDevice = new BODevice();

            boDevice.SetProperties(
                id,
                model.Name,
                model.PublicId);
            return(boDevice);
        }