用3.5 SP1的功能,部署在2.0之下成功了

近日項目大膽採用了.NET 3.5 SP1中的新功能,資料訪問採用了ADO.NET Data Services, ADO.NET Entity Framework。用XElement加工資料為XML傳遞到用戶端。可銷售不願意在用戶端部署.NET 3.5 SP1, 原因太大,我們自己的軟體就幾M,可要帶231M的巨無霸。銷售給出的條件只能部署在.NET 2.0。那麼這些功能,包括方便的LINQ to Entity, LINQ to Xml 就不能用了嗎?喜歡上了LINQ,無法割捨。上Google,

使用EF 4.1的DbContext

簡述:EF4.1包括Code First和DbContext API。DbContext API為EF提供更多的工作方式:Code First,Database First和Model First。使用DbContext建構函式1. Code First約定串連namespace Magic.Unicorn{    public class UnicornsContext : DbContext    {        public UnicornsContext()        // C#

T-SQL入門(msdn)

資料類型 (Transact-SQL)Functions (Transact-SQL)運算子 (Transact-SQL)系統預存程序 (Transact-SQL)系統檢視表 (Transact-SQL) 1. 文法:BULK INSERT (Transact-SQL)DELETE (Transact-SQL)EXECUTE (Transact-SQL)FROM (Transact-SQL)IDENTITY(屬性)(Transact-SQL)NEWID (Transact-SQL)SELECT

Asynchronous Web and Network Calls on the Client in WPF(摘錄)

1. Solution:WebApp, WpfAff2. WebApp add :  Silverlight-enabled WCF Service[OperationContract]        public IList<Customer> GetCustomers()        {            List<Customer> results = new List<Customer>();           

顯示GIF表徵圖報錯:“A generic error occurred in GDI+.”

代碼如下: public static Image BytesToImage(this byte[] bytes) { Image image = null; if (bytes != null) { using (MemoryStream sm=new MemoryStream(bytes)) { image = Image.FromStream(sm);

Flex Gumbo中如何自訂HSlider資料Tip樣式的例子

接下來的Flex Gumbo中如何通過skinClass樣式,自訂HSlider資料Tip樣式。  下面是main.mxml:<?xml version="1.0" encoding="utf-8"?> <s:Application name="Spark_HSlider_skinClass_dataTip_test" xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.

在代碼中,擷取Entity Framework產生的T-SQL查詢語句

 AdventureWorksLT2008Entities db = new AdventureWorksLT2008Entities(); var querys = db.Products.Where(p => p.ProductID % 55 == 0).Select(p => new { Id = p.ProductID, LPrice = p.ListPrice, Name = p.Name }); foreach (var item in querys) {

接下來的例子示範了Flex Gumbo中如何通過自訂Skin和alpha屬性,建立透明填充色TextArea。

接下來的例子示範了Flex Gumbo中如何通過自訂Skin和alpha屬性,建立透明填充色TextArea。  下面是main.mxml:<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"

TCP/IP內三個等待時間

換了一個地方,一直沒有時間處理這篇部落格,其實相關內容早就完成快一個月了,先把這部分發出來,後續再跟進。先簡單說下:TCP/IP內三個等待時間分別為FIN-WAIT:FIN-WAIT-1 - represents waiting for a connection termination requestfrom the remote TCP, or an acknowledgment of the connectiontermination request previously sent.FIN-

利用Rhino Mock實現串口程式的單元測試

原來Mock可以這樣子用。1.   介面ISerialPort public interface ISerialPort { string PortName { get; } int BaudRate { get; } int DataBits { get; } Parity Party { get; } StopBits StopBits { get; } int BytesToRead {

Flex 4中如何給Panel設定bitmap填充背景色的例子

接下來的例子示範了Flex 4中如何通過BitmapFill和LinearGradient,給Panel設定bitmap填充背景色。 下面是main.mxml:main.mxml:<?xml version="1.0" encoding="utf-8"?> <s:Application name="Spark_Panel_fill_BitmapFill_test" xmlns:fx="http://ns.adobe.com/mxml/2009"

輸出對象的欄位名和值

在單元測試時,通過反射擷取對象的屬性值。ToString  1         private static string OutMessage(object lab) 2         { 3             Type t = lab.GetType(); 4             StringBuilder sb = new StringBuilder(); 5             foreach (var p in t.GetProperties()) 6         

如何動態修改連接字串?

為了實現程式在運行時同時管理多個資料庫,需要動態修改連接字串。方法如下:1. 修改Settings.Designer.cs的連接字串,把唯讀屬性改為可讀寫。注意,在新添加配置資料時,IDE會把你添加的內容刪除。還需再次添加。       public string ConnectionString {            get {                return ((string)(this["ConnectionString"]));            }//此為新添加的。

用工具實現T-SQL分頁代碼

工具:LinqPad要求:關鍵字過濾,時間過濾,分頁。 (from  e in EventLogs join l in Events  on e.Eventid equals l.EventIDwhere l.NeedACK==1     && e.EventTime>DateTime.Parse("2012-08-05 11:14:52" )    && e.EventTime<DateTime.Parse("2012-08-06 11:14:52"

Flex全域錯誤處理Global Error Handler在AIR 2.0和Flash Player 10.1中使用

The new global error handler enables developers to write a single handler to process all runtime errors that weren’t part of a try/catch statement. Improve application reliability and user experience by catching and handling unexpected runtime

Flex全域錯誤處理Global Error Handler代碼相容運行於低版本Flash Player

Global Error Handler是從Flash Player 10.1.x開始才加入的功能,如果將其代碼運行於Flash Player10.0.x或更低版本的FP時,swf將會出錯。那麼用什麼方法才能使Global Error Handler的代在Flash Player10.1.x時能正常使用,而在低版本FP中又不使swf出錯呢?請看如下代碼:代碼Code highlighting produced by Actipro CodeHighlighter (freeware)http:/

在Mxml的對象屬性中使用&&”和”運算子

 如: Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--><mx:Label text="Test" visible="{ boolVar1 && boolVar2 }"/> 會報錯 : -> The entity name must immediately follow the '&' in the

Flex Gumbo中如何通過skinClass樣式去掉Spark Panel下拉陰影的例子

接下來的Flex Gumbo中如何通過skinClass樣式,去掉Spark Panel下拉陰影。下面是main.mxml:<?xml version="1.0" encoding="utf-8"?> <s:Application name="Spark_Panel_skinClass_dropShadow_test" xmlns:fx="http://ns.adobe.com/mxml/2009"

最全的HTML特殊字元列表

'  &#160; &nbsp; Nonbreaking space¡ &#161; &iexcl; Inverted exclamation¢ &#162; &cent; Cent sign£ &#163; &pound; Pound sterling¤ &#164; &curren; General currency sign¥ &#165; &yen; Yen sign¦ &#166;

自訂Flex的Loading介面

首先~自訂Flex載入的原理其實就是繼承mx.preloaders.DownloadProgressBar類..然後重寫相關的方法..代碼Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->package{ import flash.display.*; import flash.events.*; import flash.net.*;

總頁數: 61357 1 .... 8196 8197 8198 8199 8200 .... 61357 Go to: 前往

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.