简体   繁体   中英

Can i create multiple tables using same model in EF core asp.net

Can I create multiple tables using the same models with EF Core? My requirement to create multiple tables(with diff names) with the same models and they do not need to share any information. Is that possible with Entity Framework Core in asp.net core?

No, you can't, and the desire to do so usually is a database design smell. Consider redesigning your table layout. Perhaps adding a column to differentiate between records can help.

See also GitHub aspnet/EntityFrameworkCore #7299: Using the same class (model) to create two tables .

Multiple Tables With Same Structure Entity Framework

I guess the above might help you.

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