本文介绍了我正在使用ASP.NET MVC 4使用Entity FrameWork来执行数据库级操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我使用Entity FrameWork使用ASP.NET MVC 4来执行数据库级操作,现在我必须对此业务类进行验证,如果我将一个单独的类作为模型来绑定这些属性以查看我是否可以使用相同的由实体框架生成的类Im working with ASP.NET MVC 4 using Entity FrameWork to perform database level operations, now i have to do validations for this business class, should i take a seperate class as model to bind these properties to view could i use the same class that was generated by entity framework//------------------------------------------------------------------------------// <auto-generated>// This code was generated from a template.//// Manual changes to this file may cause unexpected behavior in your application.// Manual changes to this file will be overwritten if the code is regenerated.// </auto-generated>//------------------------------------------------------------------------------namespace NHMD.Models{ using System; using System.Collections.Generic; public partial class INVT_Item { public int ID { get; set; } public Nullable<int> ItemMasterID { get; set; } public Nullable<int> SchoolID { get; set; } public Nullable<int> WareHouseID { get; set; } public Nullable<int> YearID { get; set; }}}推荐答案[MetadataType(typeof(PayrollMarkupMetadata))public partial class INVT_Item{ ...} 希望这会有所帮助。 谢谢Hope this helps.Thanks 这篇关于我正在使用ASP.NET MVC 4使用Entity FrameWork来执行数据库级操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!