Serh At

Serh At

  • NA
  • 2
  • 573

More clearness about the tutorial pls

Dec 19 2017 11:56 AM
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? 

Answers (1)