예제 #1
0
 public void AddCustomer(ApiCustomerClientResponseModel item)
 {
     if (!this.Customers.Any(x => x.Id == item.Id))
     {
         this.Customers.Add(item);
     }
 }
        public virtual ApiCustomerClientRequestModel MapClientResponseToRequest(
            ApiCustomerClientResponseModel response)
        {
            var request = new ApiCustomerClientRequestModel();

            request.SetProperties(
                response.Email,
                response.FirstName,
                response.LastName,
                response.Phone);
            return(request);
        }
        public virtual ApiCustomerClientResponseModel MapClientRequestToResponse(
            int id,
            ApiCustomerClientRequestModel request)
        {
            var response = new ApiCustomerClientResponseModel();

            response.SetProperties(id,
                                   request.Email,
                                   request.FirstName,
                                   request.LastName,
                                   request.Phone);
            return(response);
        }