public void AddLink(ApiLinkResponseModel item) { if (!this.Links.Any(x => x.Id == item.Id)) { this.Links.Add(item); } }
public virtual ApiLinkRequestModel MapResponseToRequest( ApiLinkResponseModel response) { var request = new ApiLinkRequestModel(); request.SetProperties( response.AssignedMachineId, response.ChainId, response.DateCompleted, response.DateStarted, response.DynamicParameters, response.ExternalId, response.LinkStatusId, response.Name, response.Order, response.Response, response.StaticParameters, response.TimeoutInSeconds); return(request); }
public virtual ApiLinkResponseModel MapRequestToResponse( int id, ApiLinkRequestModel request) { var response = new ApiLinkResponseModel(); response.SetProperties(id, request.AssignedMachineId, request.ChainId, request.DateCompleted, request.DateStarted, request.DynamicParameter, request.ExternalId, request.LinkStatusId, request.Name, request.Order, request.Response, request.StaticParameter, request.TimeoutInSecond); return(response); }