Client Interfaces Guide > TIBCO ADO.NET 2020 Data Provider for TDV > Using ADO.NET (Entity Framework Core) > EFCore ASP.NET Application
 
EFCore ASP.NET Application
Register the Entity Framework Core Provider
Complete the following steps to register the Entity Framework Core provider:
1. Add a reference to System.Data.CompositeClient.dll, located in the lib -> netstandard2.0 subfolder in the installation directory.
2. Add a reference to TIBCO.EntityFrameworkCore.Composite.dll, located in the lib -> netstandard2.0 -> EFCORE21 subfolder in the installation directory.
3. Build the project to complete the setup for using EF Core.
Creating the Data Model
There are two approaches that can be taken in creating the context and entity classes for your application. With the Code-First Approach approach, you can fine-tune your model by writing the classes manually. Alternatively, you can make use of Reverse Engineering (Scaffolding) to generate these classes automatically from your TDV schema.
Registering the Context with Dependency Injection
In order for the MVC controller to make use of the CompositeContext, you'll need to register it with dependency injection. Add the following to the beginning of your Startup.cs:
 
using MySolutionName.Models;
using Microsoft.EntityFrameworkCore;
Next, find the ConfigureServices method in Startup.cs and add the following at the end:
 
var connection = @"Host=myHost;Domain=myDomain;DataSource=myDataSource;User=myUser;Password=myPassword";
services.AddDbContext<CompositeContext>(options => options.UseComposite(connection));
Creating a Controller and Views
To create a controller and views for your web app, follow the procedure below:
1. Right-click the Controllers folder in the Solution Explorer and navigate to Add -> Controller...
2. Choose MVC Controller with views, using Entity Framework, and click Add.
3. Set the Model Class to the class corresponding to your table/view and set the Data context class to CompositeContext.
4. Click Add. Note the name of the controller.
Running your Application
Now that the controllers and views have been setup, you can launch your app using Debug -> Start Without Debugging. The app will then launch in your browser. You can find your data by navigating to <Base URL of App>/<Name of controller minus the 'Controller.cs' at the end>.