Example #1
0
 public void AddTag(ApiTagResponseModel item)
 {
     if (!this.Tags.Any(x => x.Id == item.Id))
     {
         this.Tags.Add(item);
     }
 }
        public virtual ApiTagRequestModel MapResponseToRequest(
            ApiTagResponseModel response)
        {
            var request = new ApiTagRequestModel();

            request.SetProperties(
                response.Count,
                response.ExcerptPostId,
                response.TagName,
                response.WikiPostId);
            return(request);
        }
        public virtual ApiTagResponseModel MapRequestToResponse(
            int id,
            ApiTagRequestModel request)
        {
            var response = new ApiTagResponseModel();

            response.SetProperties(id,
                                   request.Count,
                                   request.ExcerptPostId,
                                   request.TagName,
                                   request.WikiPostId);
            return(response);
        }