原创 禁用自動檢測實體更改
using(var context = newUnicornsContext()) { try { conte
原创 過程的基本概念
我們做過程管理,天天都在講過程二字,真要給過程下個定義卻沒有那麼容易。正如我們天天說某某是好人,某某是壞人,啥是好人,啥是壞人很難明確定義。但是這
原创 提高關鍵詞排名的幾個SEO技巧
關鍵詞優化是SEO中的一個重要的表現要點,通過SEO技巧,達到提高關鍵詞排名的目的。搜索引擎都是根據整個網站的內容佈局,已經網站的關注度等綜合
原创 EF Update Entity
public void Update(Entity obj) { using (MyContext db = new MyContext(co
原创 Implementing Repository Pattern With Entity Framework
The Repository pattern is defined by Patterns of Enterprise Application Architecture as: Mediates between the doma
原创 Entity Framework Repository & Unit Of Work T4 Template on CodePlex
I have a posted a project on Codeplex at http://efrepository.codeplex.com. It is a T4 template to give you a data lay
原创 Code First/Entity Framework 4.1 Videos and Articles on MSDN
Currently, 8 of the 10 videos on Code First and EF 4.1 I have already cr
原创 構架、框架、設計模式之間的關係簡述
一、軟件體系結構和框架的定義 軟件體系結構的英文單詞是“architecture”. Architecture的基本詞義是建築、建築學、建築風格。 軟件體系結構雖然根植於軟件工程,但還處於一個研究發展的階段,迄今爲止還沒有一個爲大家所
原创 C# NEW 和Overrdie
using System; namespace TestNewAndOverrideMethod{ abstract class BaseClas
原创 軟件測試需求的分析方法
軟件測試需求是開發測試用例的依據,測試需求分解的越詳細精準,表明對所測軟件的瞭解越深,對所要進行的任務內容就越清晰,對測試用例的設計質量的幫助越大
原创 爲導航屬性關閉延遲加載
延遲加載是在第一次調用導航屬性時從數據庫加載得,延遲加載是通過代理類和虛屬性實現的. public class Princess { public int Id { get; set; } public stri
原创 使用資源文件
1.讀取資源文件 ResourceManager resourceManager; resourceManager = new ResourceManager(typeof(Form1).Namespace + ".res", Assem
原创 同步加載關係實體
Eager loading is the process whereby a query for one type of entity also loads related entities as part of the query.
原创 同時加載多級關聯實體
using (var context = new UnicornsContext()) { // Load all castles, all related ladies-in-waiting, and all relat
原创 將圖片轉換爲Icon
下面是簡單的將圖片轉換爲Icon的方法,不過只支持16bit的顏色 Bitmap bm; Stream strm = this.GetType().Assembly.GetManifestResourceStream(typeof(Fo