1. Real-time record:
VaR anum = sysconfigentitybll. getqueryable (). firstordefault (item => item. Key. Trim () = "22 ");
In the data handler class call:
Public iqueryable <sysconfig> getqueryable ()
{
Mwtsentities. sysconfigs. mergeoption = mergeoption. overwritechanges;
Return mwtsentities. sysconfigs. asqueryable ();
}
Conclusion: real-time data can be obtained and updated in a timely manner.
2. Reload a data table
Use [OMSS]
Go
/***** Object: Table [DBO]. [dispatchinfo] script Date: 10/28/2011 10:51:43 ******/
Set ansi_nulls on
Go
Set quoted_identifier on
Go
Drop table [dispatchinfo]
Create Table [DBO]. [dispatchinfo] (
[ID] [int] identity (1, 1) not null,
[Dispatchsponsors] [nchar] (10) null,
[Dispatchstart] [nvarchar] (50) null,
[Dispatchend] [nvarchar] (50) null,
[Dispatchtime] [datetime] Null,
[Dispatchcontent] [nvarchar] (max) null,
[Dispatchmark] [nchar] (10) null,
[Dispatchremark] [nchar] (10) null,
[Devicetype] [int] Null,
Constraint [pk_dispathchinfo] primary key clustered
(
[ID] ASC
) With (pad_index = OFF, statistics_norecompute = OFF, ignore_dup_key = OFF, allow_row_locks = on, allow_page_locks = on) on [primary]
) On [primary]
Go