The version of SQL Server in use does not support datatype 'datetime2'.

使用的 SQL Server 版本不支持数据类型“datetime2”解决办法错误原因,在使用ado.net entity的时候,entity使用的数据库是sqlserver 2008,但后来实际使用中使用的数据库是sqlserver 2005使用的 SQL Server 版本不支持数据类型“datetime2”The version of SQL Server i …… 阅读全文

找到了多个与名为“Home”的控制器匹配的类型

问题:“/”应用程序中的服务器错误。 找到了多个与名为“Home”的控制器匹配的类型。如果为此请求(“{controller}/{action}/{id}”)提供服务的路由没有指定命名空间来搜索匹配此请求的解决:MVC中的Area的区域的时候,在一个Area中定义了一个Home控制器,在启动的时候,找到多个与名为“Home”的控制器匹配的类型。如果为此请求(“{controller …… 阅读全文

EF4.0和EF5.0增删改查的写法区别及执行Sql的方法

EF4.0和EF5.0增删改查的写法区别publicT AddEntity(T entity){//EF4.0的写法添加实体//db.CreateObjectSet().AddObject(entity);//EF5.0的写法db.Entry(entity).State =EntityState.Added; …… 阅读全文

EF5 操作数据库,分离数据操作与业务逻辑

usingMvc.Entity;usingSystem;usingSystem.Collections.Generic;usingSystem.Data.Entity.Infrastructure;usingSystem.Linq;usingSystem.Linq.Expressions;usingSystem.Reflection; …… 阅读全文

MVC htmlhelper 扩展生成 dropdownlist

using System;using System.Collections.Generic;using System.Linq;using System.Linq.Expressions;using System.Reflection;using System.Text;using System.Web.Mvc;using System.Web.Mvc.Html;u …… 阅读全文

.net list 笛卡尔积

/// /// 全组合算法 /// /// /// /// /// public static void run(List> dimvalue, List result, int layer, string curstring) { …… 阅读全文