Referencing user objects from other objects

Jul 14, 2012 at 6:28 PM
Edited Jul 14, 2012 at 6:29 PM

If I have objects that should have a reference to users (for example blogposts), how do I go about this? If I create another context for my own objects, well, how can I refer to the users from the DataContext. I think it is not right to put my own objects into the existing DataContext, right?

Jul 17, 2012 at 11:37 AM

Wrong, you should use the DataContext provided and put your objects in, so you have:

  • Users
  • Roles
  • BlogPosts

you can rename the datacontext to whatever you wish,

use Right Click -> Rename in VS, also take a look at Web.config so you don't mess up anything in there