public void AddSale(ApiSaleClientResponseModel item) { if (!this.Sales.Any(x => x.Id == item.Id)) { this.Sales.Add(item); } }
public virtual ApiSaleClientRequestModel MapClientResponseToRequest( ApiSaleClientResponseModel response) { var request = new ApiSaleClientRequestModel(); request.SetProperties( response.Amount, response.CutomerId, response.Note, response.PetId, response.SaleDate, response.SalesPersonId); return(request); }
public virtual ApiSaleClientResponseModel MapClientRequestToResponse( int id, ApiSaleClientRequestModel request) { var response = new ApiSaleClientResponseModel(); response.SetProperties(id, request.Amount, request.CutomerId, request.Note, request.PetId, request.SaleDate, request.SalesPersonId); return(response); }