1

What I'm trying to:

Get User By Id => Use the Id to get the cases the user have assigned => Return the cases.

My question is:

I know that I need to reference the MemberShip User table to the Cases table, but should I define the membership User table where I get the User as a POCO like my other tabels in my project?

Thanks in advance.

ebb
  • 9,297
  • 18
  • 72
  • 123

1 Answers1

1

If you need only ID field,then pass your class only ID.If you need more fields then you can make a custom class that holds information about User.

Also know that all the information of User class is retrieved from Database.There is also another way if you persist on using database by extending membership procedures.

Best Regards
Myra

Myra
  • 3,646
  • 3
  • 38
  • 47
  • So instead of passing all the fields in my User table to my class I just pass the Id and nothing else? – ebb Dec 16 '10 at 13:54
  • If you think that those field are unnecessary fields for other project,you should avoid using them. – Myra Dec 16 '10 at 14:35
  • I tried doing like you said, however I get an error: "One or more validation errors were detected during model generation: System.Data.Edm.EdmEntityType: : EntityType 'aspnet_Users' has no key defined. Define the key for this EntityType. System.Data.Edm.EdmEntitySet: EntityType: The EntitySet aspnet_Users is based on type aspnet_Users that has no keys defined." – ebb Dec 16 '10 at 14:52