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