VictorTzeng / Zxw.Framework.NetCore

基于EF Core的Code First模式的DotNetCore快速开发框架,其中包括DBContext、IOC组件autofac和AspectCore.Injector、代码生成器(也支持DB First)、基于AspectCore的memcache和Redis缓存组件,以及基于ICanPay的支付库和一些日常用的方法和扩展,比如批量插入、更新、删除以及触发器支持,当然还有demo。欢迎提交各种建议、意见和pr~
MIT License
765 stars 248 forks source link

Reload enity #26

Closed Diaskhan closed 6 years ago

Diaskhan commented 6 years ago

How do U reload Enity configutation or entity?

when new property is added ? (field of entity)

VictorTzeng commented 6 years ago

@Diaskhan In the development environment, I usually drop the database directly. In the formal environment, you can manually change the data table and entity at the same time, if the changes are not much. Of course, you can also use the database migration command.

Diaskhan commented 6 years ago

not Victor i actually talking about another thing

1.We could create tablewith fields 2.then could make entitytypeconfiguration https://stackoverflow.com/questions/26957519/ef-core-mapping-entitytypeconfiguration 3.Generate class model

4.Compile it in assembly 5.Load assembly to memory and use in dbcontext.SET<>

The problem gets when we want recompile class and reload a newer version of entitclass!

VictorTzeng commented 6 years ago

Sorry, Diaskhan, I have not encountered this situation yet. Could you show me your codes or exceptions?

Diaskhan commented 6 years ago

no it problem of net core ! https://github.com/dotnet/coreclr/issues/552