Exemple #1
0
        public object Handle(object _)
        {
            AllocatableSalesPerson matchingSalesPerson;

            lock (Lock)
            {
                matchingSalesPerson = _store
                                      .FindMatchingSalesPerson(SalesPersonMatchingCriteria)
                                      .FirstOrDefault();

                matchingSalesPerson?.AllocateToCustomer();
            }

            SimulateDeAllocationIfRequired(matchingSalesPerson);
            return(matchingSalesPerson ?? _nextHandler?.Handle(null));
        }
 public IEnumerable <SalesPersonDto> GetAll()
 => _store.FindMatchingSalesPerson(Any)
 .Select(SalesPersonDto.FromDomainEntity)
 .ToList();