Пример #1
0
 public void AddPostTypes(ApiPostTypesResponseModel item)
 {
     if (!this.PostTypes.Any(x => x.Id == item.Id))
     {
         this.PostTypes.Add(item);
     }
 }
Пример #2
0
        public virtual ApiPostTypesRequestModel MapResponseToRequest(
            ApiPostTypesResponseModel response)
        {
            var request = new ApiPostTypesRequestModel();

            request.SetProperties(
                response.Type);
            return(request);
        }
Пример #3
0
        public virtual ApiPostTypesResponseModel MapRequestToResponse(
            int id,
            ApiPostTypesRequestModel request)
        {
            var response = new ApiPostTypesResponseModel();

            response.SetProperties(id,
                                   request.Type);
            return(response);
        }