代码改变世界

The EF4 Sample

2011-12-19 10:15 by barbarossia, 128 阅读, 0 推荐, 收藏, 编辑
摘要:The Entity Framework 4.0 is a powful framework that used by entity to SQL. Here is a sample explain the many-to-many relationship.The relationshipis userand role. The User_Role is thetable that save the relationship between user and role.Somecode snipesare : public void UpdateUser(DC.User use... 阅读全文

A tool add your cs file head comment

2011-12-19 09:45 by barbarossia, 380 阅读, 0 推荐, 收藏, 编辑
摘要:When we want to add some head comment, we will copy, paste sth on file head. But we can also through this toolkit to add sth on file.The code is: class Program { private const string license = "//*********************************************************\r\n//\r\n// Copyright (c) Microso... 阅读全文

Introduce Windows SDKs Msi Scripts

2011-11-02 09:30 by barbarossia, 644 阅读, 0 推荐, 收藏, 编辑
摘要:Copyright (c) Microsoft Corporation. All rights reserved. Windows Installer utility scripts for use with Windows Scripting HostWiLstPrd.vbs - lists products, product properties, features, and componentsWiImport.vbs - imports files to an MSI databaseWiExport.vbs - exports files from an MSI databaseWi 阅读全文

Create and share Visual Studio color schemes

2011-11-01 15:14 by barbarossia, 196 阅读, 0 推荐, 收藏, 编辑
摘要:As developers we often spend a large part of our day staring at code within Visual Studio. If you are like me, after awhile the default VS text color scheme starts to get a little boring.The good news is that Visual Studio allows you to completely customize the editor background and text colors to w 阅读全文

Convert EntityFrameWork which called Entity connection string to Sql conncion string

2011-10-30 09:29 by barbarossia, 486 阅读, 0 推荐, 收藏, 编辑
摘要:When use the EntityFrameWork, it will be automated generate the Entity Connection string which like :<add name="WCFDataEntities" connectionString="metadata=res://*/Model.csdl|res://*/Model.ssdl|res://*/Model.msl;provider=System.Data.SqlClient;provider connection string=&quot;da 阅读全文

How can I exit the window while press the Esc key

2011-10-30 08:33 by barbarossia, 262 阅读, 0 推荐, 收藏, 编辑
摘要:When I on the windows page I want to exit this window,how can I do it in code.The following code do that as example.using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Windows;using System.Windows.Controls;using System.Windows.Data;using System.Windows.Docu 阅读全文