Пример #1
0
 public void AddSelfReference(ApiSelfReferenceResponseModel item)
 {
     if (!this.SelfReferences.Any(x => x.Id == item.Id))
     {
         this.SelfReferences.Add(item);
     }
 }
Пример #2
0
        public virtual ApiSelfReferenceRequestModel MapResponseToRequest(
            ApiSelfReferenceResponseModel response)
        {
            var request = new ApiSelfReferenceRequestModel();

            request.SetProperties(
                response.SelfReferenceId,
                response.SelfReferenceId2);
            return(request);
        }
Пример #3
0
        public virtual ApiSelfReferenceResponseModel MapRequestToResponse(
            int id,
            ApiSelfReferenceRequestModel request)
        {
            var response = new ApiSelfReferenceResponseModel();

            response.SetProperties(id,
                                   request.SelfReferenceId,
                                   request.SelfReferenceId2);
            return(response);
        }