Example #1
0
        public (IReadOnlyCollection <Person>, IReadOnlyCollection <Address>) AsMultiResultSet()
        {
            if (!_target.SupportsMultipleResultSets)
            {
                throw new SkipException($"{_target.GetType().Name} does not support multiple result sets");
            }
            var result = _target.SelectPersonAndAddress(_db);

            return(result);
        }
Example #2
0
 internal void Connect()
 {
     if (!_exceptions.ContainsKey(_target.GetType()))
     {
         try
         {
             _db.Connect();
         }
         catch (Exception e)
         {
             _exceptions[_target.GetType()] = e;
         }
     }
     if (_exceptions.ContainsKey(_target.GetType()))
     {
         throw _exceptions[_target.GetType()];
     }
 }