Example #1
0
        public virtual ApiMachinePolicyResponseModel MapBOToModel(
            BOMachinePolicy boMachinePolicy)
        {
            var model = new ApiMachinePolicyResponseModel();

            model.SetProperties(boMachinePolicy.Id, boMachinePolicy.IsDefault, boMachinePolicy.JSON, boMachinePolicy.Name);

            return(model);
        }
        public virtual BOMachinePolicy MapEFToBO(
            MachinePolicy ef)
        {
            var bo = new BOMachinePolicy();

            bo.SetProperties(
                ef.Id,
                ef.IsDefault,
                ef.JSON,
                ef.Name);
            return(bo);
        }
        public virtual MachinePolicy MapBOToEF(
            BOMachinePolicy bo)
        {
            MachinePolicy efMachinePolicy = new MachinePolicy();

            efMachinePolicy.SetProperties(
                bo.Id,
                bo.IsDefault,
                bo.JSON,
                bo.Name);
            return(efMachinePolicy);
        }
Example #4
0
        public virtual BOMachinePolicy MapModelToBO(
            string id,
            ApiMachinePolicyRequestModel model
            )
        {
            BOMachinePolicy boMachinePolicy = new BOMachinePolicy();

            boMachinePolicy.SetProperties(
                id,
                model.IsDefault,
                model.JSON,
                model.Name);
            return(boMachinePolicy);
        }