public void AddSale(ApiSaleResponseModel item) { if (!this.Sales.Any(x => x.Id == item.Id)) { this.Sales.Add(item); } }
public virtual ApiSaleRequestModel MapResponseToRequest( ApiSaleResponseModel response) { var request = new ApiSaleRequestModel(); request.SetProperties( response.IpAddress, response.Note, response.SaleDate, response.TransactionId); return(request); }
public virtual ApiSaleResponseModel MapRequestToResponse( int id, ApiSaleRequestModel request) { var response = new ApiSaleResponseModel(); response.SetProperties(id, request.IpAddress, request.Note, request.SaleDate, request.TransactionId); return(response); }