上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 29 下一页
摘要: 上周码程序的时候碰到个问题,因为设计上的约束,一个方法接受的参数只能为List<object>类型,然而该方法需要处理的真实数据则是确定的List<Currency>。然而C#不允许显示的直接转换类型,并且两个方向上都不可以操作。这个问题让我爆了一会儿,最后在MSDN上找到了一个OfType<T>的 阅读全文
posted @ 2016-06-17 02:09 shiningrise 阅读(3982) 评论(0) 推荐(0) 编辑
摘要: public static class ApiHelper { public static ReslultInfo Try(Action> action) { var r = new ReslultInfo(); try { action(r)... 阅读全文
posted @ 2016-06-15 20:38 shiningrise 阅读(647) 评论(0) 推荐(0) 编辑
摘要: /// /// 测试获取所有物流 /// [TestMethod] public void TestExpressController() { var Expresss = new List { new Express{Code="01",Name="测试... 阅读全文
posted @ 2016-06-15 17:02 shiningrise 阅读(568) 评论(0) 推荐(0) 编辑
摘要: Request Headers: User-Agent: FiddlerHost: localhost:3248Content-Type: application/json; charset=utf-8 Content-Length: 63 要加上Content-Type: application/ 阅读全文
posted @ 2016-06-15 12:27 shiningrise 阅读(266) 评论(0) 推荐(0) 编辑
摘要: 我们在开发WEB项目的时候,一般应用逻辑跟ASPX页面是分离的项目。应用逻辑一般会是一个DLL组件项目。如果这个组件项目中A方法使用了Session、Cookie等信息的读写,则这个方法就很难写单元测试。 但并不是写不出来,要写出来大致思路如下: 目标: 构建一个测试的环境,把需要的Session、 阅读全文
posted @ 2016-06-15 09:50 shiningrise 阅读(823) 评论(0) 推荐(0) 编辑
摘要: ASP.NET WebAPI 08 Message,HttpConfiguration,DependencyResolver Message WebAPI作为通信架构必定包含包含请求与响应两个方法上的报文,在WebAPI它们分别是HttpRequestMessage,HttpResponseMess 阅读全文
posted @ 2016-06-14 23:50 shiningrise 阅读(965) 评论(0) 推荐(0) 编辑
摘要: 不管你爱与不爱,单元测试对于一个软件的长治久安还是必不可少的一环。在Visual Studio 2012后,VS中的测试浏览器也能与第三方的集成了,用起来还是非常方便的。目前在.Net框架下的测试工具主要有Nunit、内置的MSTest以及Xunit这三个工具,本文就简单的介绍一下如何在VS中使用X 阅读全文
posted @ 2016-06-14 23:15 shiningrise 阅读(2127) 评论(0) 推荐(1) 编辑
摘要: Entity Framework 延伸系列目录 今天我们来聊聊EF的日志记录. 一个好的数据库操作记录不仅仅可以帮你记录用户的操作, 更应该可以帮助你获得效率低下的语句来帮你提高运行效率 废话不多说,我们开始 环境和相关技术 本文采用的环境与技术 系统:WIN7 数据库:SQL Server2008 阅读全文
posted @ 2016-06-14 18:33 shiningrise 阅读(438) 评论(0) 推荐(0) 编辑
摘要: 改为 阅读全文
posted @ 2016-06-14 11:44 shiningrise 阅读(189) 评论(0) 推荐(0) 编辑
摘要: - - - --> - + + --> + + + + --> 阅读全文
posted @ 2016-06-13 13:45 shiningrise 阅读(270) 评论(0) 推荐(0) 编辑
摘要: IIS AppPool\jzzcj 阅读全文
posted @ 2016-06-13 09:22 shiningrise 阅读(140) 评论(0) 推荐(0) 编辑
摘要: https://visualstudiogallery.msdn.microsoft.com/4934b087-e6cc-44dd-b992-a71f00a2a6df 阅读全文
posted @ 2016-06-12 23:37 shiningrise 阅读(459) 评论(0) 推荐(0) 编辑
摘要: 安装 nuget Microsoft.Net.Compilers 阅读全文
posted @ 2016-06-12 08:50 shiningrise 阅读(1255) 评论(0) 推荐(0) 编辑
摘要: http://www.c-sharpcorner.com/blogs/dynamic-objects-conveting-into-data-table-in-c-sharp1 阅读全文
posted @ 2016-06-10 17:15 shiningrise 阅读(261) 评论(0) 推荐(0) 编辑
摘要: https://developingsoftware.com/configuring-autofac-to-work-with-the-aspnet-identity-framework-in-mvc-5 Configuring Autofac to work with the ASP.NET Id 阅读全文
posted @ 2016-06-10 00:47 shiningrise 阅读(2759) 评论(0) 推荐(0) 编辑
摘要: FineUI非常好用,但是有一个缺点,就是不支持dynamic对象的数据绑定。查了一下源代码,找了解决方案,其实只需要几行代码就可以搞定,这就是开源的好处。 本想直接在CodePlex上贡献代码,但不知道怎么加入项目,直接写在这儿吧,如果三石觉得有用,可以考虑合并在FineUI的下一个版本中。 这是ObjectUtil类的GetPropertyValue方法,加上4行代码,即可实现对dynam... 阅读全文
posted @ 2016-06-10 00:39 shiningrise 阅读(454) 评论(0) 推荐(1) 编辑
摘要: http://www.cnblogs.com/John-Connor/archive/2012/05/03/2478821.html 引言-- 在初级篇中,我们介绍了如何利用基于ASP.NET MVC的Web程序中的Global文件来简单的重写路由。也介绍了它本身的局限性-依赖于路由信息中的键值对: 阅读全文
posted @ 2016-06-09 23:45 shiningrise 阅读(855) 评论(1) 推荐(1) 编辑
摘要: using System; using System.Web; using System.Web.Routing; using Nop.Core; using Nop.Core.Data; using Nop.Core.Infrastructure; using Nop.Services.Events; using Nop.Services.Seo; using Nop.Web.Framewor... 阅读全文
posted @ 2016-06-09 23:39 shiningrise 阅读(349) 评论(0) 推荐(0) 编辑
摘要: https://github.com/Azure/aspnet-redis-providers https://www.nuget.org/packages/Microsoft.Web.RedisSessionStateProvider/ 阅读全文
posted @ 2016-06-09 20:00 shiningrise 阅读(1021) 评论(0) 推荐(0) 编辑
摘要: http://www.xuebuyuan.com/356638.html 选择MiniProfiler.EF 默认会把MiniProfiler安装上,笔者程序是Asp.Net WebForm 不需要安装MiniProfiler.MVC3 2: 在Global.asax中添加下面代码: void Ap 阅读全文
posted @ 2016-06-09 19:49 shiningrise 阅读(673) 评论(0) 推荐(0) 编辑
摘要: AutoMapper用法 AutoMapper是对象到对象的映射工具。在完成映射规则之后,AutoMapper可以将源对象转换为目标对象。 作者:齐飞 原文:http://www.qeefee.com/article/automapper 配置AutoMapper映射规则 AutoMapper是基于 阅读全文
posted @ 2016-06-09 18:04 shiningrise 阅读(262) 评论(0) 推荐(0) 编辑
摘要: https://github.com/trailmax/IoCIdentitySample TL;DR: Registration code for Autofac, for SimpleInjector, for Unity. Tony Mackay has an alternative walk 阅读全文
posted @ 2016-06-09 17:44 shiningrise 阅读(1174) 评论(0) 推荐(0) 编辑
摘要: /// /// Register dependencies /// /// Config protected virtual void RegisterDependencies(NopConfig config) { var builder = new ContainerB... 阅读全文
posted @ 2016-06-09 17:35 shiningrise 阅读(906) 评论(0) 推荐(0) 编辑
摘要: http://stackoverflow.com/questions/6173566/run-time-registration-with-autofac Yes you can, using the Update method on ContainerBuilder: Autofac: canno 阅读全文
posted @ 2016-06-09 17:26 shiningrise 阅读(287) 评论(0) 推荐(0) 编辑
摘要: http://www.cnblogs.com/smileberry/p/4047835.html 阅读全文
posted @ 2016-06-09 16:40 shiningrise 阅读(161) 评论(0) 推荐(0) 编辑
摘要: http://www.codemaid.net/ http://www.codemaid.net/documentation/ http://www.wtoutiao.com/p/C9bNHv.html 阅读全文
posted @ 2016-06-09 14:15 shiningrise 阅读(186) 评论(0) 推荐(0) 编辑
摘要: https://visualstudiogallery.msdn.microsoft.com/1ec7db13-3363-46c9-851f-1ce455f66970 阅读全文
posted @ 2016-06-09 13:32 shiningrise 阅读(272) 评论(0) 推荐(0) 编辑
摘要: http://www.cnblogs.com/lyj/archive/2008/03/25/1119671.html 阅读全文
posted @ 2016-06-09 13:10 shiningrise 阅读(155) 评论(0) 推荐(0) 编辑
摘要: var q1 = from orderitem in q2 join pd in _iProductDetailContract.Entities on orderitem.ProductDetailId equals pd.Id join pm in ProductMainContract.Entities o... 阅读全文
posted @ 2016-06-09 00:16 shiningrise 阅读(2141) 评论(0) 推荐(0) 编辑
摘要: System.Diagnostics.Trace.Listeners.Clear(); System.Diagnostics.Trace.AutoFlush = true; System.Diagnostics.Trace.Listeners.Add(new System.Diagnostics.T 阅读全文
posted @ 2016-06-08 23:44 shiningrise 阅读(340) 评论(0) 推荐(0) 编辑
摘要: var query =from a in this.ObjectContext.siteInfo join b in this.ObjectContext.shopInfo on a.siteID equals b.siteID group new {a,b} by new { a.Lon, a.Lat, a.siteID, b.date} into g ... 阅读全文
posted @ 2016-06-08 23:36 shiningrise 阅读(943) 评论(0) 推荐(0) 编辑
摘要: 1、左连接: var LeftJoin = from emp in ListOfEmployees join dept in ListOfDepartment on emp.DeptID equals dept.ID into JoinedEmpDept from dept in JoinedEmpDept.DefaultIfEmpty() select new ... 阅读全文
posted @ 2016-06-08 22:44 shiningrise 阅读(9233) 评论(1) 推荐(1) 编辑
摘要: http://www.linqpad.net/Download.aspx 阅读全文
posted @ 2016-06-08 22:39 shiningrise 阅读(164) 评论(0) 推荐(0) 编辑
摘要: http://www.nopcommerce.com/ 阅读全文
posted @ 2016-06-08 21:42 shiningrise 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 本篇介绍Linq的Group和Join操作,继续使用《Linq 学习(3) 语法结构》中介绍的数据源。GroupGroup是进行分组操作,同SQL中的Group By类似。原型如下: public static IEnumerable<IGrouping<TKey, TSource>> GroupB 阅读全文
posted @ 2016-06-08 21:03 shiningrise 阅读(404) 评论(0) 推荐(0) 编辑
摘要: https://code.msdn.microsoft.com/OWIN-OAuth-20-Authorization-ba2b8783#content 阅读全文
posted @ 2016-06-08 15:29 shiningrise 阅读(244) 评论(0) 推荐(0) 编辑
摘要: http://git.oschina.net/shiningrise/AutofacOwinDemo webform属性注入 pagebase方式 阅读全文
posted @ 2016-06-08 07:28 shiningrise 阅读(2212) 评论(2) 推荐(0) 编辑
摘要: using Owin; using Autofac; using Autofac.Integration.Owin; using System.Web; var owin = this.Request.GetOwinContext(); var scop = owin.GetAutofacLifetimeScope(); scop.Resolv... 阅读全文
posted @ 2016-06-08 05:33 shiningrise 阅读(558) 评论(0) 推荐(0) 编辑
摘要: 结果是这两个hashcode相等 阅读全文
posted @ 2016-06-08 05:11 shiningrise 阅读(754) 评论(0) 推荐(0) 编辑
摘要: public static IAppBuilder UseAutofacMiddleware(this IAppBuilder app, ILifetimeScope container) { if (app == null) { throw new ArgumentNullExcep... 阅读全文
posted @ 2016-06-08 04:09 shiningrise 阅读(499) 评论(0) 推荐(0) 编辑
上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 29 下一页
// 侧边栏目录 // https://blog-static.cnblogs.com/files/douzujun/marvin.nav.my1502.css