跟小D每日学口语

01 2013 档案

摘要:Clickhereto contact me if you require any freelance development«Equals why ? and why not ==Mono – web development on Linux»Events – fire that eventAn event will be fired when something has happened and then you can link to that event and do something else if you wanted to. To start of with 阅读全文
posted @ 2013-01-31 14:50 Danny Chen 阅读(503) 评论(0) 推荐(0) 编辑
摘要:From Wikipedia, the free encyclopediaThis is alist ofcolorsthat have articles about them in theSimple English Wikipedia.[change]ColorNameColorHTML CodeAmaranth#E52B50Amber#FFBF00Apricot#FBCEB1Aquamarine#7FFFD4Azure#007FFFBaby blue#89CFF0Beige#F5F5DCBlack#000000Blue#0000FFBlue-green#0095B6Blue-violet 阅读全文
posted @ 2013-01-14 15:16 Danny Chen 阅读(360) 评论(0) 推荐(0) 编辑
摘要:目录预备知识2LINQ技术2LINQ技术的基础 - C#3.02自动属性2隐式类型2对象初始化器与集合初始化器3匿名类3扩展方法4Lambda表达式4.NET中的数据访问4DataSet方案5改进的的DataSet方案5手写代码通过ADO.NET2.0连接类与数据库交互5ORM – LINQ to SQL6深入了解Entity Framework7Entity Framework的核心 – EDM(Entity Data Model)7EDM概述7EDM之CSDL7EDM之SSDL11EDM之MSL12EDM中存储过程的设计15EDM中ComplexType的设计16实体数据模型映射方案17E 阅读全文
posted @ 2013-01-13 18:52 Danny Chen 阅读(2301) 评论(0) 推荐(0) 编辑
摘要:本文整理了该方法的几种重载形式:一 Html.ActionLink("linkText","actionName")该重载的第一个参数是该链接要显示的文字,第二个参数是对应的控制器的方法,默认控制器为当前页面的控制器,如果当前页面的控制器为Products,则 Html.ActionLink("detail","Detail") 则会生成 <a href="/Products/Detail">all</a>二 Html.ActionLink("linkText& 阅读全文
posted @ 2013-01-13 18:31 Danny Chen 阅读(245) 评论(0) 推荐(0) 编辑
摘要:http://huyrua.wordpress.com/2010/07/13/entity-framework-4-poco-repository-and-specification-pattern/(good article)http://stackoverflow.com/questions/4295975/repository-pattern-in-entity-framework-4-when-should-we-disposehttp://elegantcode.com/2009/12/15/entity-framework-ef4-generic-repository-and-un 阅读全文
posted @ 2013-01-11 13:26 Danny Chen 阅读(490) 评论(0) 推荐(0) 编辑
摘要:http://www.cnblogs.com/dotview/archive/2011/08/04/2136764.html 阅读全文
posted @ 2013-01-09 12:44 Danny Chen 阅读(1072) 评论(0) 推荐(0) 编辑
摘要:原文叫看《墨攻》理解IOC概念2006年多部贺岁大片以让人应接不暇的频率纷至沓来,其中张之亮的《墨攻》算是比较出彩的一部,讲述了战国时期墨家人革离帮助梁国反抗赵国侵略的个人英雄主义故事,恢宏壮阔,浑雄凝重的历史场面相当震撼。其中有一个场景:当刘德华所饰的墨者革离到达梁国都城下,城上梁国守军问:“来者何人?”,刘德华回答:“墨者革离!”,我们不妨用C#(原文是java,我修改)对这段“城门问对”的场景进行编剧并借由这个例子来理解IoC的内涵。剧本和饰演者耦合MoAttack代表《墨攻》的剧本,cityGetAsk()代表“城门问对”这段剧情,LiuDeHua是具体饰演者刘德华:代码清单1publ 阅读全文
posted @ 2013-01-08 13:32 Danny Chen 阅读(8834) 评论(3) 推荐(9) 编辑
摘要:IOC:英文全称:Inversion of Control,中文名称:控制反转,它还有个名字叫依赖注入(Dependency Injection)。作用:将各层的对象以松耦合的方式组织在一起,解耦,各层对象的调用完全面向接口。当系统重构的时候,代码的改写量将大大减少。理解依赖注入: 当一个类的实例需要另一个类的实例协助时,在传统的程序设计过程中,通常有调用者来创建被调用者的实例。然而采用依赖注入的方式,创建被调用者的工作不再由调用者来完成,因此叫控制反转,创建被调用者的实例的工作由IOC容器来完成,然后注入调用者,因此也称为依赖注入。举个有意思的例子(来源于互联网)假如我们要设计一个Girl. 阅读全文
posted @ 2013-01-08 13:30 Danny Chen 阅读(43389) 评论(25) 推荐(23) 编辑
摘要:http://www.cnblogs.com/leoo2sk/archive/2009/06/17/1504693.html这篇文章真的非常非常好···绝对值得收藏学习。目录目录1 IGame游戏公司的故事1.1 讨论会1.2 实习生小李的实现方法1.3 架构师的建议1.4 小李的小结2 探究依赖注入2.1 故事的启迪2.2 正式定义依赖注入3 依赖注入那些事儿3.1 依赖注入的类别3.1.1 Setter注入3.1.2 Construtor注入3.1.3 依赖获取3.2 反射与依赖注入3.3 多态的活性与依赖注入3.3.1 多态性的活性3.3.2 不同活性多态性 阅读全文
posted @ 2013-01-08 11:08 Danny Chen 阅读(18356) 评论(5) 推荐(12) 编辑
摘要:TheRepository Patternis a common construct to avoid duplication of data access logic throughout our application. This includes direct access to a database, ORM, WCF dataservices, xml files and so on. The sole purpose of the repository is to hide the nitty gritty details of accessing the data. We can 阅读全文
posted @ 2013-01-08 09:34 Danny Chen 阅读(753) 评论(0) 推荐(1) 编辑
摘要:ExamplesThe following code example demonstrates the implementation of theIEnumerableinterfaces for a custom collection. In this example,GetEnumeratoris not explicitly called, but it is implemented to support the use offoreach(For Eachin Visual Basic). This code example is part of a larger example fo 阅读全文
posted @ 2013-01-07 09:25 Danny Chen 阅读(257) 评论(0) 推荐(0) 编辑
摘要:IntroductionA popular pattern for ORM data access is the Repository pattern. Repositories are currently very popular even in EF for the reasons below:Hide EF from upper layerMake code better testableThe big disadvantage of EF is rigid architecture which can be hardly mocked, so if you want to unit t 阅读全文
posted @ 2013-01-06 16:25 Danny Chen 阅读(315) 评论(0) 推荐(0) 编辑
摘要:大家还记得Entity Framework 4.1/4.3 之一(概念篇)中我介绍过ObjectContext ObjectSet 以及 DBContext 和DBSet的定义。在使用了4.0很长一段时间后,我向4.3进行了过渡,这个过渡的过程中,我认识并使用了 DBContext 和 DBSet 。感觉很不错。下面我通会表格来分别展示一下ObjectContext ObjectSet DBContext DBSet:DbContextAPI feature (DbContext API功能)Relevant EF4feature/class (有关EF4中的功能/类)General purp 阅读全文
posted @ 2013-01-06 11:09 Danny Chen 阅读(663) 评论(0) 推荐(0) 编辑
摘要:In a previous article, we saw how toCreate an Entity Framework Model and Use it in Multiple Projects. In this article, we will see how to Add, Update and Delete objects in our conceptual model and push the changes to the underlying database.We will be using the same console application that we creat 阅读全文
posted @ 2013-01-05 16:55 Danny Chen 阅读(786) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示