public void AddPostLinks(ApiPostLinksResponseModel item) { if (!this.PostLinks.Any(x => x.Id == item.Id)) { this.PostLinks.Add(item); } }
public virtual ApiPostLinksRequestModel MapResponseToRequest( ApiPostLinksResponseModel response) { var request = new ApiPostLinksRequestModel(); request.SetProperties( response.CreationDate, response.LinkTypeId, response.PostId, response.RelatedPostId); return(request); }
public virtual ApiPostLinksResponseModel MapRequestToResponse( int id, ApiPostLinksRequestModel request) { var response = new ApiPostLinksResponseModel(); response.SetProperties(id, request.CreationDate, request.LinkTypeId, request.PostId, request.RelatedPostId); return(response); }