コード例 #1
0
 protected override string GetDbProviderManifestToken(Legacy.DbConnection connection)
 {
     // EF Designer does not unwrap ProviderIncompatibleExceptions and this method is protected and
     // is called by GetProviderManifest method which will wrap any exception in ProviderIncompatibleException.
     // Therefore even if the wrapped provider services throws a legacy ProviderIncompatibleException
     // it will be wrapped in non-legacy ProviderCompatibleException. Unwrapping the legacy here
     // ProviderIncompatibleException would be tricky and should not be done unless really necessary.
     return _wrappedProviderServices.GetProviderManifestToken(connection);
 }
コード例 #2
0
        public LegacyDbProviderManifestWrapper(Legacy.DbProviderManifest wrappedProviderManifest)
        {
            Debug.Assert(wrappedProviderManifest != null, "wrappedProviderManifest != null");

            _wrappedProviderManifest = wrappedProviderManifest;

            _legacyStoreTypes = _wrappedProviderManifest.GetStoreTypes().ToArray();
            _storeTypes =
                new ReadOnlyCollection<PrimitiveType>(
                    _legacyStoreTypes.Select(t => ConvertFromLegacyStoreEdmType(t, this)).ToList());
        }
コード例 #3
0
        public LegacyDbProviderServicesWrapper(Legacy.DbProviderServices wrappedProviderServices)
        {
            Debug.Assert(wrappedProviderServices != null, "wrappedProviderServices != null");

            _wrappedProviderServices = wrappedProviderServices;
        }