大家好, 我找到了一个创建N层应用程序的视频.如该视频中所示,作者能够将Northwind数据库表拖放到XML SCHEMA文件中.我认为他正在使用VS 2002或2003. 我无法在Visual Studio 2010中执行相同的操作,在VS2010中无法执行此操作,如果无法执行此操作,请让我知道如何执行此操作,因为创建没有大量字段和属性的类非常耗时,请提供另一种选择. www.xmlforasp/codesection.aspx?csID=130 [ ^ ] --- Prathap
Hi All, I have found a video to create N-Layer application.As shown in the video author was able to drag and drop northwind database table onto XML SCHEMA file.I think he is using VS 2002 or 2003. I am not able to do the same in Visual Studio 2010.Is this not possible in VS2010.If not possible, let me know how to do the same because creating a class with a large no of fields and properties is time consuming.Please provide an alternative. www.xmlforasp/codesection.aspx?csID=130[^] ---Prathap
推荐答案以下是提供有关N层设计思想的链接: 使用N层架构创建ASP.NET应用程序 [^ ] 并解决您的原始问题.为什么不使用任何类似ORM的实体框架为您生成这些DB类.这里有几篇文章可供阅读. 绝对初学者实体框架简介 [ ^ ] 关于使用部分方法在实体框架中执行验证的初学者教程 [ ^ ] 第一个链接是有关实体框架的教程.第二个特定于EF中的验证,但是如果您使用实体框架下载该示例项目,该示例项目将包含数据访问层作为单独的DLL(因此您可能会发现它也很有用) Here is a link that gives an idea on N layer design: Creating ASP.NET Applications with N-Tier Architecture[^] and coming to your original problem. Why not use any ORM like entity framework to generate these DB classes for you. here are few articles to read on that. An Introduction to Entity Framework for Absolute Beginners[^] A Beginner''s Tutorial on Performing Validations in Entity Framework using Partial Methods[^] First link is tutorial on Entity framework. Second one is specific to Validation in EF but if you download that sample project that will contain a Data access layer as a separate DLL using Entity framework(so you might find it useful too)
更多推荐
在Asp.Net中创建n层应用程序
发布评论