O'Reilly logo

Mastering F# by Suhaib Fahad, Alfonso García-Caro Núñez

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

SQL entity type provider

The entity type provider uses Entity Framework (EF) to work with the database. EF is an object-relational mapping (ORM) tool to model database objects such as SQL tables with .NET-compatible types. In this section, you will learn how to use EF with the F# SQL entity type provider.

Similar to what we saw in the SQL type provider section, we will prepare a NorthwindDB for testing.

Using the type provider

We will use the EF Code First approach to work with the database. EF Code First is a set of conventions that allows us to represent our data models and directly write the code without having to use other tools such as UML. First, we will set up a simple F# script file to explore the SQL entity type provider. Add the following ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required