Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
public PizzaRepository() => _pizzas = new List<Pizza>()
public Maybe<Pizza> Get(int id)
var pizza = _pizzas.FirstOrDefault(_ => _.Id == id);
return pizza == null ? Maybe.Empty<Pizza>() : pizza.ToMaybe();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment