Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
1
Reply
Object reference not set to an instance of an object
Nagu
May 12 2017 5:10 AM
169
Reply
public EFRepo(DbContext ctx)
{
this.DbContext = ctx;
this.DbConnection = ((ctx as System.Data.Entity.Infrastructure.IObjectContextAdapter).ObjectContext.Connection
as EntityConnection).StoreConnection;
this.DbSet = ctx.Set<TEntity>();
}
In the above code
(ctx as System.Data.Entity.Infrastructure.IObjectContextAdapter).ObjectContext.Connection
as EntityConnection
is getting null when i am changing EF 4 to 4.5
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
Saving data from one DB Table in DropDown to another DBTable
using C-sharp coding its possible to connect remote system