public List <OrderViewModel> Read(OrderBindingModel model) { if (model == null) { return(_orderStorage.GetFullList()); } if (model.Id.HasValue) { return(new List <OrderViewModel> { _orderStorage.GetElement(model) }); } return(_orderStorage.GetFilteredList(model)); }