public void AddWorkerTaskLease(ApiWorkerTaskLeaseResponseModel item) { if (!this.WorkerTaskLeases.Any(x => x.Id == item.Id)) { this.WorkerTaskLeases.Add(item); } }
public virtual ApiWorkerTaskLeaseRequestModel MapResponseToRequest( ApiWorkerTaskLeaseResponseModel response) { var request = new ApiWorkerTaskLeaseRequestModel(); request.SetProperties( response.Exclusive, response.JSON, response.Name, response.TaskId, response.WorkerId); return(request); }
public virtual ApiWorkerTaskLeaseResponseModel MapRequestToResponse( string id, ApiWorkerTaskLeaseRequestModel request) { var response = new ApiWorkerTaskLeaseResponseModel(); response.SetProperties(id, request.Exclusive, request.JSON, request.Name, request.TaskId, request.WorkerId); return(response); }