public void AddVoteType(ApiVoteTypeResponseModel item) { if (!this.VoteTypes.Any(x => x.Id == item.Id)) { this.VoteTypes.Add(item); } }
public virtual ApiVoteTypeRequestModel MapResponseToRequest( ApiVoteTypeResponseModel response) { var request = new ApiVoteTypeRequestModel(); request.SetProperties( response.Name); return(request); }
public virtual ApiVoteTypeResponseModel MapRequestToResponse( int id, ApiVoteTypeRequestModel request) { var response = new ApiVoteTypeResponseModel(); response.SetProperties(id, request.Name); return(response); }