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

            request.SetProperties(
                response.Email,
                response.FirstName,
                response.LastName,
                response.Phone);
            return(request);
        }
示例#3
0
        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);
        }