We just need to turn our application that it has to use the deep context, which is inside application
to be context.
And then it has to use a sequel server using the connection string that we defined.
In fact, the upsetting star Jason, where we've done our application to do that insert program, see
where we configure the services that are application would use.
So here we have the comments to pack the services to the container.
Make sure you always do that before you build the printer.
So right here, we want to add a new service.
So on better services, the service that we want to add is deep context.
So you can see we have dark at the context and that expects a class file.
The class one that the using for deep context is the application context.
If you control that, we just have to add the Ussing statement to the data folder.
Now, when we configure this TB context, if we go back to the application TB context right here, we
are passing the options and we are sending those options to the base class.
So in fact, options we have to configure use of sequence, server and connection string.
So here we will see options goes to.
This is just the syntax of its options dot.
That is a matter with the name of use sequel server, but it will not be available like that.
Even if you press control that it will not give you the package name that you have to add it so far
that we have to go back to the managed care packages and we will have to install a package which is
equal server with Entity Framework Core, which is Microsoft Entity Framework for that SQL server.
Make sure you are using the consistent version if one version of the package you are using is preview
seven and other one is preview five or even Darknet five, then things won't work and you will run into
error message.
So always make sure that you are using the same version.
Let me start this sequel server and the post and you'll get packages.
Now, if you press control dot, you will see the closing statement using Microsoft that entity framework
core with it at that.
And on this sequel to what we have to write the connection stream.
So what exactly is our connection string that is inside app settings?
We used a special block with the name of connection strings.
Since we put our connection string inside this special block pain that I was talking about, we can
directly use the key value here to extract the connection string.
Let me copy this name.
Going to go back to our program talks and right here on better configuration.
We have an existing method that is provided, which is get connection strength.
In fact, this method we have to pass the string name, which is the Ford Connection.
Once you use that, it would automatically find the connection string and consider our sequence over.
Now, this cat connection string is a special method, and this method will only look for this default
connection inside a plaque with the name of connection strings.
If your name this connection strings one, then it will not be able to find this connection string because
this method will only look inside the block, which is connection strings.
So that is why I said to name it exactly the same.
If you wanted to name it something else, we have different ways of getting that.
But I do not want to go into those details right now.
So with this context will be configured with the connection strength.
So all the configuration is done that was needed for the deep context.
Now we are on the final step where we have to create a database and then the table inside SQL Server.
Let's take a look at that in the next week.
You.