从实体框架6生成的模型中删除不需要的列是不错的做法? [英] Is it good practice to delete columns that are not required from entity framework 6 generated models?

查看:80
本文介绍了从实体框架6生成的模型中删除不需要的列是不错的做法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Is it good practice to delete columns that are not required from entity     framework 6 generated models? If not then what is the alternative.


Please explain.

推荐答案

没有。

而是使用与EDMX模型相同的签名创建自己的模型,仅包含有用的属性。



但如果您不需要它在EDMX模型中,这意味着你也不需要在DB中。

因此,如果它根本没用,请从DB中删除并相应地更新EDMX。





-KR
No.
Rather create your own Models with the same signature as EDMX models and only include the useful properties.

But if you don't need it in EDMX models, that means that you don't need it in DB as well.
Hence, if it not useful at all, delete from DB and update the EDMX accordingly.


-KR


这篇关于从实体框架6生成的模型中删除不需要的列是不错的做法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆