简体   繁体   English

不在数据库上应用数据注释

[英]Not applying data annotations on the database

I have several entities that I applied different data annotations on each one, but when I use of migration, these data annotations are not applied to the database.我有几个实体,我在每个实体上应用了不同的数据注释,但是当我使用迁移时,这些数据注释不会应用于数据库。 In addition, I also using System.ComponentModel.DataAnnotations.此外,我还使用 System.ComponentModel.DataAnnotations。 where is the problem from?问题出在哪里?

Run the 'Update-Database' command to apply the updated/new migration to the database.运行“Update-Database”命令将更新/新迁移应用到数据库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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