I can't find DataBase
in System.Data.Entity
.
Any one know why?
Thank you.
Create the ADO.NET Entity Data ModelRight-click on your project in the Solution Explorer window and select the menu option Add -> New Item. In the Add New Item dialog, select the Data category. Select the ADO.NET Entity Data Model template, give the Entity Data Model the name Northwind.
You dont have to import System.Data.Entity.Database
. The System.Data.Entity
is enough.
Use Database.SetInitializer
instead of DbDatabase.SetInitializer
.
If you missed it it, the class is called Database without "Db"
You need to reference the EntityFramework.dll
assembly which is where the Database class is declared. You could install it from the corresponding NuGet package.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With