数据层专家 - 请帮忙! [英] Data layer experts - Please Help!

查看:70
本文介绍了数据层专家 - 请帮忙!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨伙计


任何人都可以指点我的方向,如何制作一个可用于新ASP的

数据层。 NET 2.0数据组件

(GridView等)?


我问的原因是因为我希望完全拥有我的数据层

单独组装。但是,这似乎不太可能。让我来解释....


每个描述如何做到这一点的网站似乎都遵循相同的模式 -

网站的一半谈论数据层的方式然后,当它出现一个例子时,他们会直接在页面上删除一个SQLDataSource或一个ObjectDataSource

。我在这里遗漏了一些东西 - 对我来说这不是数据

层。


另外,当你在ASP.NET应用程序中创建一个DataSet时,你得到的方法与普通程序集中的DataSet不同。
方法。事实上,在一个ASP.NET

DataSet中,你甚至没有得到任何C#代码,这意味着你不能在

普通代码中使用它(所以你不能围绕它创建一个包装器。它还意味着

ASP.NET组件不能使用程序集DataSet(因为它不会生成插入和删除方法) - 它只会生成"&的GetData QUOT;并且

更新。


我想我错过了一些信息,所以如果你能够支持
就可以了帮助!


谢谢



Hi folks

Can anyone point me in the direction of any information on how to make a
data layer which will work with the new ASP.NET 2.0 data components
(GridView, etc)?

The reason I ask is because I want to have my data layer in a totally
separate assembly. However, this doesn''t seem possible. Let me explain....

Every site which describes how to do this seems to follow the same pattern -
half the site talks about how data layers are great, etc. Then, when it
comes to an example, they drop an SQLDataSource or an ObjectDataSource
directly on the page. Am I missing something here - to me this isn''t a data
layer.

Also, when you create a DataSet in an ASP.NET application, you get different
methods to that of a DataSet in a normal assembly. In fact, in an ASP.NET
DataSet you don''t even get any C# code which means that you can''t use it in
normal code (so you can''t create a wrapper around it). It also means that
ASP.NET components won''t work with an assembly DataSet (since it doesn''t
generate Insert and Delete methods) - it only generates "GetData" and
"Update".

I think I am missing some chunk of information so would be great if you
could help!

Thanks

Will

推荐答案

是当你设计一个你想要抽象的灵活架构时,所有拖放设计师的东西都不实用或不可用。


如果你想要它做得对,你需要自己完成这一切,而不需要

设计师为你做这一切。自己写下插入/更新/删除/选择

语句等。


" William Buchanan" <无线************** @ freenet.co.uk>在消息中写道

新闻:e1 ************** @ TK2MSFTNGP11.phx.gbl ...
Yes, all the drag and drop designer stuff is not practical or usable when
you are designing a flexible architecture that you want to abstract.

If you want it done right, you need to do it all yourself without having the
designer do it all for you. Write your insert/update/delete/select
statements yourself, etc.

"William Buchanan" <wi**************@freenet.co.uk> wrote in message
news:e1**************@TK2MSFTNGP11.phx.gbl...
嗨伙计们>
任何人都可以向我指出有关如何制作可与新的ASP.NET 2.0数据组件(GridView等)配合使用的数据层的任何信息吗?

我问的原因是因为我希望将数据层放在一个完全独立的程序集中。但是,这似乎不太可能。让我解释一下....

每个描述如何做到这一点的网站似乎都遵循相同的模式 - 一半的网站谈论数据层是如何伟大的等等。然后,<当谈到一个例子时,他们直接在页面上删除一个SQLDataSource或一个
ObjectDataSource。我在这里错过了什么 - 对我来说
这不是数据层。

另外,当你在ASP.NET应用程序中创建一个DataSet时,你得到了不同的方法到普通程序集中的DataSet。事实上,在ASP.NET DataSet中,你甚至没有得到任何C#代码,这意味着你不能在普通代码中使用它(所以你不能创建一个包装器周围)。它也意味着ASP.NET组件不能使用程序集DataSet
(因为它不会生成Insert和Delete方法) - 它只会生成
GetData。和更新。

我想我错过了一些信息,如果你能提供帮助就会很棒!

谢谢

Hi folks

Can anyone point me in the direction of any information on how to make a
data layer which will work with the new ASP.NET 2.0 data components
(GridView, etc)?

The reason I ask is because I want to have my data layer in a totally
separate assembly. However, this doesn''t seem possible. Let me explain....

Every site which describes how to do this seems to follow the same
pattern - half the site talks about how data layers are great, etc. Then,
when it comes to an example, they drop an SQLDataSource or an
ObjectDataSource directly on the page. Am I missing something here - to me
this isn''t a data layer.

Also, when you create a DataSet in an ASP.NET application, you get
different methods to that of a DataSet in a normal assembly. In fact, in
an ASP.NET DataSet you don''t even get any C# code which means that you
can''t use it in normal code (so you can''t create a wrapper around it). It
also means that ASP.NET components won''t work with an assembly DataSet
(since it doesn''t generate Insert and Delete methods) - it only generates
"GetData" and "Update".

I think I am missing some chunk of information so would be great if you
could help!

Thanks

Will



阅读有关如何使用ObjectDataSource连接数据层的信息。 ObjectDataSource的

设计用于自定义数据层。


- 布鲁斯(sqlwork.com)



" William Buchanan" <无线************** @ freenet.co.uk>在消息中写道

新闻:e1 ************** @ TK2MSFTNGP11.phx.gbl ...
read about how to interface your data layer with ObjectDataSource. The
design of the ObjectDataSource was to be used with custom data layers.

-- bruce (sqlwork.com)


"William Buchanan" <wi**************@freenet.co.uk> wrote in message
news:e1**************@TK2MSFTNGP11.phx.gbl...
嗨伙计们>
任何人都可以向我指出有关如何制作可与新的ASP.NET 2.0数据组件(GridView等)配合使用的数据层的任何信息吗?

我问的原因是因为我希望将数据层放在一个完全独立的程序集中。但是,这似乎不太可能。让我解释一下....

每个描述如何做到这一点的网站似乎都遵循相同的模式 - 一半的网站谈论数据层是如何伟大的等等。然后,<当谈到一个例子时,他们直接在页面上删除一个SQLDataSource或一个
ObjectDataSource。我在这里错过了什么 - 对我来说
这不是数据层。

另外,当你在ASP.NET应用程序中创建一个DataSet时,你得到了不同的方法到普通程序集中的DataSet。事实上,在ASP.NET DataSet中,你甚至没有得到任何C#代码,这意味着你不能在普通代码中使用它(所以你不能创建一个包装器周围)。它也意味着ASP.NET组件不能使用程序集DataSet
(因为它不会生成Insert和Delete方法) - 它只会生成
GetData。和更新。

我想我错过了一些信息,如果你能提供帮助就会很棒!

谢谢

Hi folks

Can anyone point me in the direction of any information on how to make a
data layer which will work with the new ASP.NET 2.0 data components
(GridView, etc)?

The reason I ask is because I want to have my data layer in a totally
separate assembly. However, this doesn''t seem possible. Let me explain....

Every site which describes how to do this seems to follow the same
pattern - half the site talks about how data layers are great, etc. Then,
when it comes to an example, they drop an SQLDataSource or an
ObjectDataSource directly on the page. Am I missing something here - to me
this isn''t a data layer.

Also, when you create a DataSet in an ASP.NET application, you get
different methods to that of a DataSet in a normal assembly. In fact, in
an ASP.NET DataSet you don''t even get any C# code which means that you
can''t use it in normal code (so you can''t create a wrapper around it). It
also means that ASP.NET components won''t work with an assembly DataSet
(since it doesn''t generate Insert and Delete methods) - it only generates
"GetData" and "Update".

I think I am missing some chunk of information so would be great if you
could help!

Thanks

Will



是ObjectDataSource是为多层设计的。


" Bruce Barker"写道:
Yes ObjectDataSource is designed for multi-layers.

"Bruce Barker" wrote:
阅读有关如何使用ObjectDataSource连接数据层的信息。 ObjectDataSource的设计将与自定义数据层一起使用。

- 布鲁斯(sqlwork.com)


威廉布坎南 ; <无线************** @ freenet.co.uk>在消息中写道
新闻:e1 ************** @ TK2MSFTNGP11.phx.gbl ...
read about how to interface your data layer with ObjectDataSource. The
design of the ObjectDataSource was to be used with custom data layers.

-- bruce (sqlwork.com)


"William Buchanan" <wi**************@freenet.co.uk> wrote in message
news:e1**************@TK2MSFTNGP11.phx.gbl...
嗨伙计们
任何人都可以向我指出有关如何使用新的ASP.NET 2.0数据组件
(GridView等)的数据层的任何信息的方向吗?

每个描述如何做到这一点的网站似乎都遵循相同的模式 - 一半的网站谈论数据层是如何伟大的等等。然后,<当谈到一个例子时,他们直接在页面上删除一个SQLDataSource或一个
ObjectDataSource。我在这里错过了什么 - 对我来说
这不是数据层。

另外,当你在ASP.NET应用程序中创建一个DataSet时,你得到了不同的方法到普通程序集中的DataSet。事实上,在ASP.NET DataSet中,你甚至没有得到任何C#代码,这意味着你不能在普通代码中使用它(所以你不能创建一个包装器周围)。它也意味着ASP.NET组件不能使用程序集DataSet
(因为它不会生成Insert和Delete方法) - 它只会生成
GetData。和更新。

我想我错过了一些信息,如果你能提供帮助就会很棒!

谢谢

Hi folks

Can anyone point me in the direction of any information on how to make a
data layer which will work with the new ASP.NET 2.0 data components
(GridView, etc)?

The reason I ask is because I want to have my data layer in a totally
separate assembly. However, this doesn''t seem possible. Let me explain....

Every site which describes how to do this seems to follow the same
pattern - half the site talks about how data layers are great, etc. Then,
when it comes to an example, they drop an SQLDataSource or an
ObjectDataSource directly on the page. Am I missing something here - to me
this isn''t a data layer.

Also, when you create a DataSet in an ASP.NET application, you get
different methods to that of a DataSet in a normal assembly. In fact, in
an ASP.NET DataSet you don''t even get any C# code which means that you
can''t use it in normal code (so you can''t create a wrapper around it). It
also means that ASP.NET components won''t work with an assembly DataSet
(since it doesn''t generate Insert and Delete methods) - it only generates
"GetData" and "Update".

I think I am missing some chunk of information so would be great if you
could help!

Thanks

Will




这篇关于数据层专家 - 请帮忙!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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