// A transaction script
        public Money RecognizedRevenue(long contractNumber, DateTime asOf)
        {
            // This logic is certainly simple enough for a transaction script.
            // A Domain Model would certainly be an overkill.
            var result = Money.Dollars(0);

            try
            {
                var dr = _gateway.FindRecognitionsFor(contractNumber, asOf);
                while (dr.Read())
                {
                    result = result.Add(Money.Dollars(dr.GetDouble(0)));
                }
                return(result);
            }
            catch (SqlException e)
            {
                throw new ApplicationException(e.Message, e);
            }
        }