VictorTzeng / Zxw.Framework.NetCore

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reload enity

Diaskhan opened this issue · comments

How do U reload Enity configutation or entity?

when new property is added ? (field of entity)

commented

@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.

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!

commented

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