在Asp.Net中创建n层应用程序

编程入门 行业动态 更新时间:2024-10-21 11:39:04
本文介绍了在Asp.Net中创建n层应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

大家好, 我找到了一个创建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层应用程序

本文发布于:2023-11-15 23:49:51,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1599066.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:应用程序   Asp   Net

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!