Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. COHello, Thanks for your answer. I have a private IList<Email> field mapped in the background, but it is exposed by a public IEnumerable<Email>. Also the setter should of course be private/protected - it is not my actual code but a quick example i wrote for making it more simple (ill update it). In this case loading all emails to iterate them could work, but what about a scenario with album/pictures where i just need one picture instead of loading maybe 100 pictures to just find one ? I would like it to not load all from the database but only get the one needed.
      singulars
    2. COSo lazy loading of the picture data. It depends on how you want to access the photo. If you already have the key then it would be logical to access the photo record directly. For example the following url's /user/photos/photo/photoId /user/photos/album/albumId By the way.. although a user is the owner of an email does not make it part of the user. So a emails collection on the user class is not correctly modelled. Just reflect it on real life. You are the owner of your house and/or car but your house or car is not part of you. If just hapens that you have a relation with your car or house.
      singulars
    3. COThis is part-way to how I would have implemented it. The problem is that consuming code can update an email's IsPrimary property directly, without going through the User class's SetPrimary method, bypassing the solution and quickly messing things up.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload