public List <PaymentViewModel> Read(PaymentBindingModel model) { if (model.Id.HasValue) { return(new List <PaymentViewModel> { _paymentStorage.GetElement(model) }); } return(_paymentStorage.GetFullList()); }
public List <PaymentViewModel> Read(PaymentBindingModel model) { if (model == null || model.ClientId != null) { return(_paymentStorage.GetFullList()); } if (model.Id.HasValue) { return(new List <PaymentViewModel> { _paymentStorage.GetElement(model) }); } return(_paymentStorage.GetFilteredList(model)); }