示例#1
0
 public void AddTenantVariable(ApiTenantVariableResponseModel item)
 {
     if (!this.TenantVariables.Any(x => x.Id == item.Id))
     {
         this.TenantVariables.Add(item);
     }
 }
        public virtual ApiTenantVariableRequestModel MapResponseToRequest(
            ApiTenantVariableResponseModel response)
        {
            var request = new ApiTenantVariableRequestModel();

            request.SetProperties(
                response.EnvironmentId,
                response.JSON,
                response.OwnerId,
                response.RelatedDocumentId,
                response.TenantId,
                response.VariableTemplateId);
            return(request);
        }
        public virtual ApiTenantVariableResponseModel MapRequestToResponse(
            string id,
            ApiTenantVariableRequestModel request)
        {
            var response = new ApiTenantVariableResponseModel();

            response.SetProperties(id,
                                   request.EnvironmentId,
                                   request.JSON,
                                   request.OwnerId,
                                   request.RelatedDocumentId,
                                   request.TenantId,
                                   request.VariableTemplateId);
            return(response);
        }