public List <ReceiptViewModel> Read(ReceiptBindingModel model) { if (model == null) { return(_receiptStorage.GetFullList()); } if (model.Id.HasValue) { return(new List <ReceiptViewModel> { _receiptStorage.GetElement(model) }); } return(_receiptStorage.GetFilteredList(model)); }