Exemplo n.º 1
0
        public virtual ApiWorkerTaskLeaseResponseModel MapBOToModel(
            BOWorkerTaskLease boWorkerTaskLease)
        {
            var model = new ApiWorkerTaskLeaseResponseModel();

            model.SetProperties(boWorkerTaskLease.Id, boWorkerTaskLease.Exclusive, boWorkerTaskLease.JSON, boWorkerTaskLease.Name, boWorkerTaskLease.TaskId, boWorkerTaskLease.WorkerId);

            return(model);
        }
        public virtual BOWorkerTaskLease MapEFToBO(
            WorkerTaskLease ef)
        {
            var bo = new BOWorkerTaskLease();

            bo.SetProperties(
                ef.Id,
                ef.Exclusive,
                ef.JSON,
                ef.Name,
                ef.TaskId,
                ef.WorkerId);
            return(bo);
        }
        public virtual WorkerTaskLease MapBOToEF(
            BOWorkerTaskLease bo)
        {
            WorkerTaskLease efWorkerTaskLease = new WorkerTaskLease();

            efWorkerTaskLease.SetProperties(
                bo.Exclusive,
                bo.Id,
                bo.JSON,
                bo.Name,
                bo.TaskId,
                bo.WorkerId);
            return(efWorkerTaskLease);
        }
Exemplo n.º 4
0
        public virtual BOWorkerTaskLease MapModelToBO(
            string id,
            ApiWorkerTaskLeaseRequestModel model
            )
        {
            BOWorkerTaskLease boWorkerTaskLease = new BOWorkerTaskLease();

            boWorkerTaskLease.SetProperties(
                id,
                model.Exclusive,
                model.JSON,
                model.Name,
                model.TaskId,
                model.WorkerId);
            return(boWorkerTaskLease);
        }