public OrderValidation() { _validators = new Dictionary <Func <OrderRequest, bool>, string> { { o => o.MenuItem != MenuItemEnum.NotSet, "The MenuItem must be set." }, { o => _locations.Any(l => l.Id == o.LocationId), "The LocationId does not exist." }, { o => o.Quantity > 0, "The Quantity must be a number more than zero." } }; }