我们可以在mvc中为单个表创建2个模型类 [英] can we create 2 model classes for single table in mvc

查看:66
本文介绍了我们可以在mvc中为单个表创建2个模型类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们可以在mvc模型中为sql中的单个表创建2个类,我的要求是我在一个模型类中有验证,现在对于进一步的类我不需要任何验证我只想插入用户给出的数据中的数据,任何建议请告诉我

can we create 2 classes in mvc models for single table in sql, my requirement is i have validations in one model class, now for further class i dont need any validations i just want to insert the data whichever the data given by user, any suggestion please let me know

推荐答案

只能在表上定义一个模型类。此外,类np_user_dtls和np_user_dtls1都相同且具有相同的验证。那么,请你澄清两个不同类的需要。
Only one model class can be defined on a table. Also, both classes np_user_dtls and np_user_dtls1 are same and having same validations. So, could you please clarify the need of two different classes.


这篇关于我们可以在mvc中为单个表创建2个模型类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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