Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jan 05, 2013 10:34 AM by ignatandrei
Member
1 Points
9 Posts
Jan 05, 2013 09:24 AM|LINK
Hi guys, I need your help.
I've two different controllers, each of them instantiate a Dbcontext object relative to the same database (SQL CE),
using EF 5 Code First.
Controller 1: DELETE entity1 -> OK
Controller 2: TEST IF EXISTS entity1 -> EXISTS!
So controllers are out of sync.
I've tried sharing a static Dbcontext between controllers, but I received a lot of errors. How can I solve this?
All-Star
135150 Points
21680 Posts
Moderator
MVP
Jan 05, 2013 10:34 AM|LINK
Jumpa
Member
1 Points
9 Posts
Shared DbContext
Jan 05, 2013 09:24 AM|LINK
Hi guys, I need your help.
I've two different controllers, each of them instantiate a Dbcontext object relative to the same database (SQL CE),
using EF 5 Code First.
Controller 1: DELETE entity1 -> OK
Controller 2: TEST IF EXISTS entity1 -> EXISTS!
So controllers are out of sync.
I've tried sharing a static Dbcontext between controllers, but I received a lot of errors. How can I solve this?
ignatandrei
All-Star
135150 Points
21680 Posts
Moderator
MVP
Re: Shared DbContext
Jan 05, 2013 10:34 AM|LINK