public void AddPostType(ApiPostTypeResponseModel item) { if (!this.PostTypes.Any(x => x.Id == item.Id)) { this.PostTypes.Add(item); } }
public virtual ApiPostTypeRequestModel MapResponseToRequest( ApiPostTypeResponseModel response) { var request = new ApiPostTypeRequestModel(); request.SetProperties( response.Type); return(request); }
public virtual ApiPostTypeResponseModel MapRequestToResponse( int id, ApiPostTypeRequestModel request) { var response = new ApiPostTypeResponseModel(); response.SetProperties(id, request.Type); return(response); }