English 中文(简体)
更新数据Set——在哪一级?
原标题:Updating DataSet - in which layer?

I try to construct 3-tier application. In DAL I get data from database (No-SQL) to DataSets. In BLL I process this data if it is necessary. In PL I show appropriate data.

The question is: If data in database are still updating, and I need to have at once newest rows , should I update DataSet in BLL with some timer or somewhere else?

最佳回答

当你说“一度”。 我必须假设,你的申请非常急切地涉及数据......因为你应当使用你的DL和BL之间的第四层,叫<>Cache。

由于你急切地敲响了你想要的东西,而且为了快事,你从来不把数据库放在一边,你一度在更新时,就把这个实体的切记清楚下来了,而下届利比里亚人民党则要求提供数据,而海滩是空洞的,这样它就能够取回一套新的记录,把它放在下面的呼声中。

如欲了解最新情况,可自行通知系统,或简单实施http://msdn.microsoft.com/en-us/library/system. Collections.specialized.inotify Collectionchanged.aspx”rel=“nofollow”

如果你不希望处理所有这些麻烦,如果你送去新行,你已经掌握了数据,你可以很容易地将数据添加到电网上(或你正在使用的任何电像标上)。

DataTable dt = bll.ListAllEmployeesByCompanyId( 2 );
dt.Rows.Insert(0, myNewRow);
gv.DataSource = dt;

如果数据来自数据库(所有数据都属于星体),你可以很容易地制造冰层未爆炸。

这符合你的战略,总是给我们开发的每一软件带来一个和唯一的问题:

用户是否真的关心这个专题?

Because, we developers tend to assume a lot, and sometimes, you do assume wrongly :)

问题回答

暂无回答




相关问题
SQL Server - How many users do I *really* need?

I m setting up an application, and I m looking into purchasing a license for SQL Server. My question is pretty simple (though may have a complicated answer...) How many users accounts do I really ...

Object Graph / Persistence Question

I m currently working with an online application that requires multiple screens/steps in order to complete. The application domain is modeled using an object graph. Persistence to and from a database ...

Why does stack get truncated in Exception.StackTrace?

Why does the high part of the stack (in Exception.StackTrace) gets truncated? Let s see a simple example: public void ExternalMethod() { InternalMethod(); } public void InternalMethod() { try ...

ASP.NET MVC and Service Oriented Architecture

I would like to know how do i incorporate a feature like wcf within and MVC application. My current idea of the architecture is as follows: EntityFramework -> ASP.NET MVC (Views) ...