摘要: 语法注意点 可以使用扩展方法来扩展类或接口。 不能重写扩展方法。 扩展方法只能在非嵌套、非泛型静态类内部定义。 扩展方法必须定义在静态类中。 扩展方法的第一个参数的类型用于指定被扩展的类型,它限制该扩展方法只能作用于该类型。 扩展方法的第一个参数必须带有 "this" 修饰符。 调用方必须引入扩展方法的命名空间。 调用扩展方法的语法,... 阅读全文
posted @ 2015-08-05 14:11 霍旭东 阅读(700) 评论(0) 推荐(0) 编辑
摘要: Use a ScaleTransform with a ScaleX of -1 for horizontal and ScaleY of -1 for vertical flipping, applied to the image's RenderTransform property. Using RenderTransformOrigin="0.5,0.5" on the image make... 阅读全文
posted @ 2015-08-05 11:33 霍旭东 阅读(707) 评论(0) 推荐(0) 编辑
摘要: 在给ImageBrush绑定动态图片是会报以下错误。 Error 4 The provided DependencyObject is not a context for this Freezable. Parameter name: context MSDN 中是怎么说的呢? A Freezable is a special type of object ... 阅读全文
posted @ 2015-07-31 14:31 霍旭东 阅读(813) 评论(0) 推荐(0) 编辑
摘要: CLR 作为.Net 程序跨平台运行的载体,和Java的JVM有着类似的功能.随着.NET Framework的日益发展,CLR这些年又有哪些变化了? 阅读全文
posted @ 2015-07-11 18:57 霍旭东 阅读(15910) 评论(43) 推荐(66) 编辑
摘要: 面向对象设计的金字塔你知道吗?熟悉吗?除了封装,继承,多态你还了解多少OOD 原则? 确认自己已是OOD精通的“大侠”请绕路。 不知道,也别急,且听a56爆大奖在线娱乐细细道来。 关键词和定义都提供双语,让a56爆大奖在线娱乐们感受下原汁原味,顺便学点专业英语… 阅读全文
posted @ 2015-07-09 14:28 霍旭东 阅读(3004) 评论(11) 推荐(18) 编辑
摘要: GC 做.netFramework一大卖点,时常被作为面试题。a56爆大奖在线娱乐就给大家一个概括性的介绍。看完a56爆大奖在线娱乐应该能够应对常常出现的面试题。 a56爆大奖在线娱乐提及Server GC & WrokStation GC 。Concurrent GC和Background GC. 阅读全文
posted @ 2015-07-07 17:55 霍旭东 阅读(5913) 评论(7) 推荐(18) 编辑
摘要: Stephen Toub From MicroSoft Crop.Stephen ClearyIt's All About the SynchronizationContextHow would I run an async Task method synchronously?Should I ex... 阅读全文
posted @ 2015-06-19 10:34 霍旭东 阅读(227) 评论(0) 推荐(1) 编辑
摘要: 参考 Updating an MVC Partial View with Ajax RenderPartial vs RenderAction vs Partial vs Action in MVC Razor Adding a Custom Directory to Razor View Engine’s Partial View Locations in ASP.Net MVC3 阅读全文
posted @ 2015-06-08 14:24 霍旭东 阅读(199) 评论(0) 推荐(0) 编辑
摘要: 初级部分 入门教程 Learn Entity Framework(微软官方) http://www.entityframeworktutorial.net/ Fluent API https://msdn.microsoft.com/en-us/data/jj591617.aspx#2.1 高级部分 存储过程|表值函数 Store Functions for... 阅读全文
posted @ 2015-05-27 11:19 霍旭东 阅读(715) 评论(0) 推荐(1) 编辑
摘要: 继承映射策略的三种策略 There are following three different approaches to represent an inheritance hierarchy in Code First: Table per Hierarchy (TPH): This approach suggests one table for entire class inher... 阅读全文
posted @ 2015-05-25 17:55 霍旭东 阅读(1418) 评论(0) 推荐(0) 编辑
摘要: 引言 在主表中指定Key,子表中指定Required后,并不会在数据库中生成级联删除的外键。那怎么才能使EF在数据中生成级联删除的外键? SQLServer数据库中级联删除功能配置界面: 上图中显示只用[required]特性后生成的外键没有级联删除动作。 看似正确的解决方案。(治标的处理方式) 版本:EF6.0.1 RC 一对多场景,在子对象映射中开启级联... 阅读全文
posted @ 2015-05-23 10:20 霍旭东 阅读(5567) 评论(1) 推荐(0) 编辑
摘要: 使用 Windows 集成安全性访问 SQL Server 如果您的应用程序运行在基于 Windows 的 Intranet 上,则也许可以将 Windows 集成身份验证用于数据库访问。集成安全性使用在操作系统线程上建立的当前 Windows 标识来访问 SQL Server 数据库。然后,您可以将 Windows 标识映射到 SQL Server 数据库和权限。 若要使用 Windows ... 阅读全文
posted @ 2015-05-22 14:49 霍旭东 阅读(2304) 评论(0) 推荐(0) 编辑
摘要: This is exactly how cascading deletes behaves in EF. Setting Cascade on a relation in EF designer instructs EF to execute DELETE statement for each loaded realated entity. It doesn't say anything abou... 阅读全文
posted @ 2015-05-21 15:24 霍旭东 阅读(518) 评论(0) 推荐(0) 编辑
摘要: 参考 Loading Related Entities with Entity Framework - A Beginner's Primer 阅读全文
posted @ 2015-05-14 12:57 霍旭东 阅读(578) 评论(0) 推荐(0) 编辑
摘要: 引言 WPF中微软提供了一些基本的控件,但是工作中这些基础的控件往往不能满足a56爆大奖在线娱乐们的需求,这个时候a56爆大奖在线娱乐们就需要根据实际的需求去开发自己的控件,但要注意不是所有功能不满足的情况都需要通过自定义控件来实现。实际上一旦用到自定义控件,说明WPF提供的Style,Datatemplate,ControlTemplate的特性已不能满足a56爆大奖在线娱乐们的需求啦。 自定义控件简介 继... 阅读全文
posted @ 2015-05-07 21:53 霍旭东 阅读(427) 评论(0) 推荐(0) 编辑
摘要: 引言 EntityFramework 6 作为微软的开源ORM框架,有着得天独厚的优势。微软也在MVC中主推EF做为ORM框架。但是在实际的项目开发中a56爆大奖在线娱乐们总是感觉到EF有些慢,或者有这样那样的问题。但实际上有时是因为a56爆大奖在线娱乐们滥用导致了问题的出现。本章就像对EF的性能优化方面的内容做个抛砖引玉,希望能给大家一点启发或者帮助。 常见的提升性能的方案 参考 Tips to improve Entit... 阅读全文
posted @ 2015-05-07 17:28 霍旭东 阅读(1018) 评论(0) 推荐(0) 编辑
摘要: 示例: XAML(代码A): 请留意上面加粗文字部分。 WPF提供两个类来描述路径数据:一个是StreamGeometry,另一个是PathFigureCollection。 类似:的形式是StreamGeometry的XAML代码a56爆大奖在线娱乐形式... 阅读全文
posted @ 2015-04-24 09:44 霍旭东 阅读(7907) 评论(0) 推荐(3) 编辑
摘要: 数据源增加SeriesSource 使用方式 增加依赖属性public enum SeriesType { Line, Bar, Column, Scatter, Pie } public class ChartHelper { #region SeriesSource public static readonly DependencyP... 阅读全文
posted @ 2015-04-23 10:39 霍旭东 阅读(954) 评论(0) 推荐(0) 编辑
摘要: 如何使用WPFToolKit Chart private void button1_Click(object sender, EventArgs e) { var s = new Series(); s.ChartType = SeriesChartType.Line; var d = new DateTime(2013, 04, 01); s.Points.... 阅读全文
posted @ 2015-04-22 10:44 霍旭东 阅读(4447) 评论(0) 推荐(0) 编辑
摘要: 自定义样式1 效果: 代码: 自定义样式2 效果: 代码: 参考 继续聊WPF——自定义CheckBox控件外观 Custom WPF check box with inner shadow effect. 阅读全文
posted @ 2015-04-21 15:37 霍旭东 阅读(2733) 评论(0) 推荐(0) 编辑
摘要: 参考 WPF: Customize your Application with Styles and Control Templates (Part 2 of 2) 阅读全文
posted @ 2015-04-20 10:33 霍旭东 阅读(198) 评论(0) 推荐(0) 编辑
摘要: 参考 ASP.NET MVC 5 with EF 6 - Working With Files Rename, Resize, Upload Image (ASP.NET MVC) ASP.NET MVC Image Uploader 阅读全文
posted @ 2015-04-19 11:37 霍旭东 阅读(446) 评论(0) 推荐(0) 编辑
摘要: 简介 图解 参考 Using the Model-View-ViewModel Pattern 阅读全文
posted @ 2015-04-15 10:35 霍旭东 阅读(529) 评论(0) 推荐(0) 编辑
摘要: 控件:IconURLSupplierDynamic Data Display2009Windows Presentation Foundation (WPF)2010MicrosoftModern UI (Metro) Charts for Windows 8, WPF, Silverlight20... 阅读全文
posted @ 2015-04-15 09:51 霍旭东 阅读(7677) 评论(0) 推荐(0) 编辑
摘要: 如何使用Chart 实例: Binding数据源中是一个KeyValuePair对象。可以是Dictionary. 如何添加第二个Y坐... 阅读全文
posted @ 2015-04-14 10:37 霍旭东 阅读(1394) 评论(0) 推荐(0) 编辑