1
Reply

More clearness about the tutorial pls

Serh At

Serh At

Dec 19 2017 11:56 AM
117
Hello,
 
I have a question on this tutorial:
 
http://www.c-sharpcorner.com/UploadFile/abhikumarvatsa/entity-frameworks-database-seed-method/
 
I came far until step 6. I don't understand why it doesnt go blue with 'dbinitializer' and 

class Program

{

static void Main(string[] args)

{

using (var context = new StudentContext())

{

Database.SetInitializer<StudentContext>(new StudentDbInitializer());

 
 i put this in program.cs but it wont recognize studentcontext. What is the problem? 

Upload Source Code  Select only zip and rar file.
Answers (1)