在Asp.Net中创建n层应用程序 [英] Creating n layer Application in Asp.Net

查看:60
本文介绍了在Asp.Net中创建n层应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我找到了一个创建N层应用程序的视频.如该视频中所示,作者能够将Northwind数据库表拖放到XML SCHEMA文件中.我认为他正在使用VS 2002或2003.
我无法在Visual Studio 2010中执行相同的操作,在VS2010中无法执行此操作,如果无法执行此操作,请让我知道如何执行此操作,因为创建没有大量字段和属性的类非常耗时,请提供另一种选择.

http://www.xmlforasp.net/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.

http://www.xmlforasp.net/codesection.aspx?csID=130[^]

---Prathap

推荐答案

以下是提供有关N层设计思想的链接:

使用N层架构创建ASP.NET应用程序 [^ ]

并解决您的原始问题.为什么不使用任何类似ORM的实体框架为您生成这些DB类.这里有几篇文章可供阅读.

绝对初学者实体框架简介 [ ^ ]
关于使用部分方法在实体框架中执行验证的初学者教程 [
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层应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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