The type arguments for method 'System.Data.Entity.Database.SetInitializer<TContext>(System.Data.Entity.IDatabaseInitializer<TContext>)' cannot be inferred from the usage. Try specifying the type arguments explicitly.
Hello:)
Please make sure that you've referred the EntityFramework.dll successfully,and then refer the namespace of
using System.Data.Entity;
And then directly use DataBase.SetSerializer(……); But your class should also implement the interface of IDatabaseInitializer<TContext>.
Reguards!
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: Music Store Tutorial - Error: System.Data.Entity.Database.SetInitializer
Jun 22, 2012 12:12 AM|LINK
Hello:)
Please make sure that you've referred the EntityFramework.dll successfully,and then refer the namespace of
using System.Data.Entity;
And then directly use DataBase.SetSerializer(……); But your class should also implement the interface of IDatabaseInitializer<TContext>.
Reguards!