From the course: .NET Essentials: LINQ for Databases

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Connect to EF model in a .NET assembly

Connect to EF model in a .NET assembly - .NET Tutorial

From the course: .NET Essentials: LINQ for Databases

Start my 1-month free trial

Connect to EF model in a .NET assembly

- [Instructor] With Entity Framework, our classes are defined in a Visual Studio project, and they're compiled into a .NET framework or .NET core assembly. So for our example, we have this console application, and we've defined our models in here, these two places. And then I went up and I did a build using the debug settings, and that results in all these files in our output folder, in this Debug folder, including the database files. What I've done is I've copied these over to another folder. I'll show you that in a minute, but first of all, let's talk about the files we need. I need to connect to this executable from LINQPad. This contains our classes. In the real world, we'd probably use a DLO instead. Also, the connection string for the database is inside this config file, so I'll need to use that from LINQPad. Now, I've copied these files, as I said, to our source folder in the Assets folder in this folder, ExeF.…

Contents