public Maybe <Deal> Load(string id)
        {
            Loading(id);
            var deal = _reader.Load(id);

            if (deal.Any())
            {
                Loaded(deal.Single());
            }
            else
            {
                DidNotFind(id);
            }
            return(deal);
        }
 public Maybe <Deal> Load(string id)
 {
     return(ImmutableInterlocked.GetOrAdd(ref _cache, id, i => _reader.Load(i)));
 }
Esempio n. 3
0
 public Maybe <Deal> Load(string id)
 {
     return(_reader.Load(id));
 }