#F

winform只能有一个实例运行且打开已运行窗口

staticclassProgram{privatestaticMutexonlyOne;[STAThread]staticvoidMain(){onlyOne=newMutex(true,Process.GetCurrentProcess().ProcessName);if(onlyOne.WaitOne(0,fal...

webapi输入验证过滤器ValidationActionFilter

publicclassvalidationActionFilter:ActionFilterAttribute{publicoverridevoidOnActionExecuting(System.Web.Http.Controllers.HttpActionContextactionContext){varmodel...

Code First Migrations: Making __MigrationHistory not a system table

https://blog.oneunicorn.com/2012/02/27/code-first-migrations-making-__migrationhistory-not-a-system-table/ CodeFirstMigrations usesatablecalled _...

ASP.NET WebForm中用async/await实现异步

1.在.aspx中添加异步标记<%@PageLanguage="C#"Async="true"%>2.在.aspx.cs或者.ascx.cs(用户控件)中添加异步方法privateasyncTaskGetMyPosts(){varposts=awaitServiceFactory.BlogPostSevic...

VS代码段扩展Snippet Designer is a Visual Studio plug in which allows you to create and search for snippets inside the IDE

 https://visualstudiogallery.msdn.microsoft.com/803e021c-fce2-4637-a05d-bb078cffc492?SRC=VSIDE https://github.com/mmanela/SnippetDesigner ...

C# Refactorings VS插件

http://vsrefactoringessentials.com/Features/Refactorings-CSharp...
代码星球 代码星球·2020-04-04

Autofac和DynamicProxy2搭配实现Aop动手训练

http://www.cnblogs.com/zhengwl/p/5433181.htmlAop含义:aspect-orientedprogramming实现工具介绍   Autofac是一个比较流行的Ioc组件,DynamicProxy2是theCastleProjectcore的一部分,提供了一个拦截框架...

捕获EF提交异常

try{}catch(DbEntityValidationExceptiondbex){stringerrMsg=string.Empty;foreach(vareveindbex.EntityValidationErrors){errMsg+=string.Format("Entityoftype"{0}"insta...
代码星球 代码星球·2020-04-04

Code First 迁移

https://msdn.microsoft.com/zh-cn/data/jj591621DataAccessandStorage>学习>EntityFramework>开始操作>CodeFirst迁移本演练将提供对实体框架中CodeFirst迁移的概述。您可以完成整个演练,也可以跳至自己感兴...
代码星球 代码星球·2020-04-04

表达式拼接Expression<Func<IEntityMapper, bool>> predicate

///<summary>///重写以筛选出当前上下文的实体映射信息///</summary>protectedoverrideIEnumerable<IEntityMapper>EntityMappersFilter(IEnumerable<IEntityMapper>e...

EF Code First Migrations数据库迁移

http://www.cnblogs.com/libingql/p/3330880.html1、EFCodeFirst创建数据库  新建控制台应用程序Portal,通过程序包管理器控制台添加EntityFramework。  在程序包管理器控制台中执行以下语句,安装EntityFramework。PM>Insta...

关于MarshalByRefObject的解释

http://www.cnblogs.com/webfpc/archive/2010/03/10/1667101.html 首先了解一下不同应用程序域中的对象的通信方式有两种:一种是跨应用程序域边界传输对象副本一种是使用代理交换消息。 简单来讲,继承此类的对象可以跨越应用程序域边界被引用,甚至被远程...

EF批量插入 扩展

https://efbulkinsert.codeplex.com/ https://github.com/loresoft/EntityFramework.Extended...
代码星球 代码星球·2020-04-04

msbuild ConfuserEx.Build 加密

https://www.nuget.org/packages/ConfuserEx.Build/<?xmlversion="1.0"encoding="utf-8"?><projectbaseDir="bin"outputDir="confused"xmlns="http://confuser.cod...
首页上一页...14051406140714081409...下一页尾页