VistaDB 6
VistaDB / Getting Started / Using VistaDB with Entity Framework - Introduction
In This Topic
    Using VistaDB with Entity Framework - Introduction
    In This Topic

    What Is Entity Framework?

    Entity Framework (EF) is an object-relational mapper that enables .NET developers to work with relational data using domain-specific objects. It eliminates the need for most of the data-access code that developers usually need to write.  It ships with .NET 4.0 and later (Visual Studio 2010 and later) and is Microsoft's preferred data access strategy for .NET Framework applications.

    Entity Framework sits between most application code and ADO.NET so it extends and can work with the traditional .NET data access methods.

    How does It Relate to VistaDB?

    VistaDB is an ADO.NET provider and ships with the necessary extensions unique to Entity Framework to enable Entity Framework to work directly with it.  Entity Framework can automatically generate data access code compatible with VistaDB as well as many other databases.  Because Entity Framework was designed to be very independent of the underlying database technology it's possible to develop an application with Entity Framework and use multiple different database technologies behind the scenes, all transparent to the application.

    There are a few key points to know about using EF with VistaDB:

    1. Only Database-First is Supported:  VistaDB doesn't currently support either Model First or Code First development approaches with Entity Framework.
    2. Provider Registration Required:  Microsoft ships the necessary provider for SQL Server to work with EF with the .NET framework but the VistaDB provider will have to be distributed with your application and registered before it can be used. 

    What About Entity Framework Core?

    EF Core is the next generation ORM that is intended to replace the original Entity Framework for new applications.  It is entirely distinct from Entity Framework and is not supported by VistaDB yet.

    Where Do I Get Started?

    Most of the work you will do to enable data access with Entity Framework is common to all database technologies so your first step should be to visit the MSDN section on Entity Framework to get an understanding of the basics of using EF.  When you want to get started with your first project, follow the steps in Using VistaDB with Entity Framework - Getting Started.

    Show Me Some Samples

    There are several Entity Framework-specific sample applications that get installed with VistaDB 6.  All of the samples are installed in the Public Documents folder on your computer, typically C:\Users\Public\Documents\VistaDB 6.  Within the Samples folder look at the Entity Framework samples.

    See Also