简体   繁体   中英

What happens when I have an array as a property of ApplicationUser?

I have added a property to my ApplicationUser class and made the migration but I don't see any change to my database schema.

If I add data to this array where would it be stored?

Arrays are not mapped. Actually the only enumerable that is mapped is ICollection . Anything else will be ignored by EF. As a result, the answer to your question is that it will not be stored. You can have an array property, and you can add stuff to that array, but as soon as the entity is out of scope, it will all be discarded. Nothing will be persisted to your database.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM