Table of contents
Collapse the table of content
Expand the table of content

DbmlFile Type Provider (F#)

Den Delimarsky|Last Updated: 8/18/2017
1 Contributor

Provides the types for a database schema encoded in a .dbml file, the database schema format used by LINQ to SQL. .dbml files contain a schema for a database.

Namespace/Module Path: Microsoft.FSharp.Data.TypeProviders

Assembly: FSharp.Data.TypeProviders (in FSharp.Data.TypeProviders.dll)


type DbmlFile<File : string,              
                     ?ResolutionFolder : string,
                     ?ContextTypeName : string,
                     ?Serializable : bool>

Static Type Parameters

Type ParameterDescription
File : stringThe path to the DBML file for the database mapping.
?ResolutionFolder : stringA folder to be used to resolve relative file paths at compile time. The default value is the folder that contains the project or script.
?ContextTypeName : stringThe name of the container type that you use to access all the generated types.
?Serializable : booltrue if you want the generated types to be serializable. The default is false.


The .dbml file is an XML file that contains the full description or schema for a relational database. DBML stands for Database Modeling Language and is the database schema format that LINQ to SQL uses. You can generate a .dbml file by using the command-line tool, SQLMetal.exe. For more information on SQLMetal.exe, see SqlMetal.exe (Code Generation Tool). For more information on LINQ to SQL, see LINQ to SQL.

For a walkthrough on how to use the DbmlFile type provider, see Walkthrough: Generating F# Types from a DBML File (F#).


Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Server 2008 R2

Version Information

F# Core Library Versions

Supported in: 2.0, 4.0, Portable

See Also

Microsoft.FSharp.Collections Namespace (F#)

© 2020 Microsoft