3

I have three tables structure like following

AppUser             User                App              
*********           ******              ******
AppUserId           UserId              AppId
UserId
AppId 

UserId and AppId of Table AppUser is foreign keys to table User and App. When I generate 3 tables to Entity Data Model, it has three class AppUser, User as well as App. However, I don't uderstand AppUser.UserReference and AppUser.User

cat916
  • 1,363
  • 10
  • 18

1 Answers1

3

AppUser.User is navigational property of type User, AppUser.UserReference is of type EntityReference<User> . They are comletely different objects.

You can use AppUser.User to access related user properties or to change related user. You can use AppUser.UserReference, for example, to load related user with EntityReference<T>.Load() method.

In fact AppUser.UserReference.Value equals AppUser.User.

objectbox
  • 1,281
  • 1
  • 11
  • 13