System.Data.Common.DbProviderManifest.GetStoreTypes()

Here are the examples of the csharp api class System.Data.Common.DbProviderManifest.GetStoreTypes() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

1. Example

Project: referencesource
Source File: Converter.cs
View license
private static PrimitiveType GetPrimitiveType(Som.ScalarType scalarType,
                                                          DbProviderManifest providerManifest)
        {
            PrimitiveType returnValue = null;
            string scalarTypeName = scalarType.Name;

            foreach (PrimitiveType primitiveType in providerManifest.GetStoreTypes())
            {
                if (primitiveType.Name == scalarTypeName)
                {
                    returnValue = primitiveType;
                    break;
                }
            }

            Debug.Assert(scalarType != null, "Som scalar type should always resolve to a primitive type");
            return returnValue;
        }

2. Example

View license
private void LoadProviderManifest(DbProviderManifest storeManifest,
                                                      bool checkForSystemNamespace)
        {

            foreach (PrimitiveType primitiveType in storeManifest.GetStoreTypes())
            {
                //Add it to the collection and the primitive type maps
                this.AddInternal(primitiveType);
                _primitiveTypeMaps.Add(primitiveType);
            }

            foreach (EdmFunction function in storeManifest.GetStoreFunctions())
            {
                AddInternal(function);
            }
        }