摘要:
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.Nam... 阅读全文
摘要:
代码如下: public static Image BytesToImage(this byte[] bytes) { Image image = null; if (bytes != null) { using (MemoryStream sm=new MemoryStream(bytes)) { image = Image.FromStream(sm); } } return image; }... 阅读全文
摘要:
用.NET 自带的 ImageAnimator类来播放GIF图像 1. 注册动画事件ImageAnimator.Animate(animatedImage, new EventHandler(this.OnFrameChanged)); 2. 在OnFrameChanged事件中调用this.Invalidate(); 3. 在OnPaint中绘当前帧ImageAnimator.UpdateFra... 阅读全文
摘要:
sapi.dll: %windir%\System32\Speech\Common using SpeechLib;SpVoice voice = new SpVoiceClass(); voice.Speak(text, SpeechVoiceSpeakFlags.SVSFDefault); 阅读全文
摘要:
1. Solution:WebApp, WpfAff 2. WebApp add : Silverlight-enabled WCF Service [OperationContract] public IList<Customer> GetCustomers() { List<Customer> results = new List<Customer>(); results.Add(new Customer {LastName="Brown",FisrtName="Pete" }); results.Add(new 阅读全文
摘要:
数据类型 (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... 阅读全文
摘要:
简述: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 ... 阅读全文
摘要:
1. public class Blog{ … public virtural ICollection<Post> Posts{get;set;}} public class Post{… public ICollection<Comment> Comments{get;set;}} public class Comment{… public Post Post{get;set;}} 2. pub... 阅读全文
摘要:
实然发现Dropbox能正常使用了 阅读全文
摘要:
UDP_Server:UDP_Client 阅读全文