IList <QuoteMapItem> GetOpportunities(Stage stage, Expression <Func <Quote, bool> > filterExpression = null)
        {
            var unitOfWork = UnitOfWorkFactory.CreateUnitOfWork();
            var quotes     = unitOfWork.Quotes.GetFilteredEntities(filterExpression).ActualQuotes();

            return(QueriesHelper.GetOpportunities(quotes, unitOfWork.Customers, stage).ToList());
        }
        public IList <QuoteMapItem> GetOpportunities(Stage stage, Expression <Func <Quote, bool> > filterExpression = null)
        {
            var unitOfWork = CreateUnitOfWork();
            var quotes     = unitOfWork.Quotes.GetFilteredEntities(filterExpression ?? FilterExpression);
            var customers  = unitOfWork.Customers;

            return(QueriesHelper.GetOpportunities(quotes, customers, stage).ToList());
        }
 public IList <QuoteMapItem> GetOpportunities()
 {
     return(QueriesHelper.GetOpportunities(GetQuotes()).ToList());
 }