Пример #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.Notes,
                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.Notes,
                                   request.Phone);
            return(response);
        }
 public void SetCustomerIdNavigation(ApiCustomerClientResponseModel value)
 {
     this.CustomerIdNavigation = value;
 }