This is a problem which can occur when there is an old version of a DLL still lingering somewhere around.Make sure that the latest assemblies are deployed and no duplicated older assemblies are hiding in certain folders.Your best bet would be to dele…
public class BaseRepository<T> where T : class { //实例化EF框架 DataModelContainer db = new DataModelContainer(); //添加 public T AddEntities(T entity) { db.Entry<T>(entity).State = EntityState.Added; …