Beispiel #1
0
 public void AddClient(ApiClientResponseModel item)
 {
     if (!this.Clients.Any(x => x.Id == item.Id))
     {
         this.Clients.Add(item);
     }
 }
		public virtual ApiClientRequestModel MapResponseToRequest(
			ApiClientResponseModel response)
		{
			var request = new ApiClientRequestModel();
			request.SetProperties(
				response.Email,
				response.FirstName,
				response.LastName,
				response.Note,
				response.Phone);
			return request;
		}
		public virtual ApiClientResponseModel MapRequestToResponse(
			int id,
			ApiClientRequestModel request)
		{
			var response = new ApiClientResponseModel();
			response.SetProperties(id,
			                       request.Email,
			                       request.FirstName,
			                       request.LastName,
			                       request.Note,
			                       request.Phone);
			return response;
		}