偷偷摘套内射激情视频,久久精品99国产国产精,中文字幕无线乱码人妻,中文在线中文a,性爽19p

實現(xiàn)設(shè)置ADO.NET數(shù)據(jù)屬性說明

開發(fā) 后端
在ADO.NET數(shù)據(jù)中既定義了數(shù)據(jù)表的約束關(guān)系以及數(shù)據(jù)表之間的關(guān)系,還可以對數(shù)據(jù)表中的數(shù)據(jù)進行排序等。ADO.NET數(shù)據(jù)使用方法一般有三種。

有很多值得學(xué)習(xí)的地方,這里我們主要介紹ADO.NET數(shù)據(jù),包括介紹ADO.NET數(shù)據(jù)等方面,在向大家詳細介紹ADO.NET數(shù)據(jù)之前,首先讓大家了解下ADO.NET數(shù)據(jù),然后全面介紹ADO.NET數(shù)據(jù),在這里拿出來和大家分享一下。。#t#

前面文章已經(jīng)介紹,介紹了Entity Data Model、Entity SQL、ObjectQuery、EntityCommand、LINQ to Entities等等及其代碼演示。Part 4主要演示如何通過相關(guān)技術(shù)或Debug工具,如SQL Server Profiler、ToTraceString 方法、eSqlBlast 工具、LINQPad工具等等,來查看生成的T-SQL腳本。Part 5 演示如何新增、更新和刪除數(shù)據(jù)實體,并相應(yīng)更新數(shù)據(jù)庫。本篇文章Part 6 演示如何處理并發(fā)更新。

設(shè)置并發(fā)模式
Entity Framework 實現(xiàn)了樂觀的并發(fā)模式(Optimistic Concurrency Model)。默認(rèn)情況下,ADO.NET數(shù)據(jù)在實體更新數(shù)據(jù)提交到數(shù)據(jù)庫時,并不會檢查并發(fā)。對于高頻率的并發(fā)屬性,你需要設(shè)置屬性的并發(fā)模式為Fixed。
 

這些屬性將會加入到T-SQL腳本的WHERE子句部分,ADO.NET數(shù)據(jù)用來比較客戶端的值和數(shù)據(jù)庫端的值,示例代碼:

  1. public void UpdateProduct()  
  2. {  
  3. Product product = context.Product.FirstOrDefault(p => p.ProductID == 1004);  
  4. if (product != null)  
  5. {  
  6. product.Color = "White";  
  7. product.StandardCost = 200;  
  8. product.ListPrice = 250;  
  9. }  
  10. context.SaveChanges();  
  11. }  
     
責(zé)任編輯:chenqingxiang 來源: 51CTO
相關(guān)推薦

2009-12-21 14:55:49

ADO.NET屬性

2009-12-18 17:01:21

ADO.NET數(shù)據(jù)

2009-12-30 09:46:02

ADO.NET操作

2009-12-30 15:50:18

ADO.NET Dat

2009-12-23 09:26:56

ADO.NET屬性

2009-12-25 14:23:35

ADO.NET設(shè)置

2009-12-21 10:37:05

Ado.Net 實例

2009-12-28 15:05:56

ADO.NET 數(shù)據(jù)

2009-12-21 17:29:43

ADO.NET模型

2009-12-22 17:43:26

ADO.Net技術(shù)

2009-12-30 16:05:20

ADO.NET實例

2009-12-22 11:17:58

ADO.NET產(chǎn)品

2009-12-24 09:34:47

調(diào)用ADO.NET

2009-12-22 09:43:20

ADO.NET對象

2009-11-12 13:19:55

2009-11-04 11:30:35

ADO.NET Dat

2009-12-24 10:37:03

ADO.NET訪問數(shù)據(jù)

2009-12-18 14:20:26

ADO.NET組件

2009-12-21 14:39:09

ADO.NET技巧

2009-12-22 14:29:57

ADO.NET模型
點贊
收藏

51CTO技術(shù)棧公眾號