2
我试图在我的mvc应用程序中使用mvc-mini-profiler。我为我的上下文创建了一个包装,Castle Windsor创建了这个实例。但是,我收到错误“空间”SSpace'没有关联的集合“。 edmx在汇编A中,汇编B中的DigidosEntities中,并且在汇编C中。任何想法可能是什么问题?我收到了最新版本的分析器。mvc-mini-profiler,实体框架给出:空间'SSpace'没有关联的集合
public interface IDataStore : IDisposable
{
int SaveChanges(int personId);
IObjectSet<TEntity> CreateObjectSet<TEntity>() where TEntity : class;
}
public class ProfiledDigidosEntities : IDataStore, IDisposable
{
private DigidosEntities _context = null;
public ProfiledDigidosEntities()
{
var connectionString = ConfigurationManager.ConnectionStrings["DigidosEntities"].ConnectionString;
var connection = new EntityConnection(connectionString);
var conn = ProfiledDbConnection.Get(connection);
_context = ObjectContextUtils.CreateObjectContext<DigidosEntities>(conn); /* Error: The space 'SSpace' has no associated collection */
}
public void Dispose()
{
if (_context != null)
_context.Dispose();
}
public int SaveChanges(int personId)
{
return _context.SaveChanges(personId);
}
public IObjectSet<TEntity> CreateObjectSet<TEntity>() where TEntity : class
{
return _context.CreateObjectSet<TEntity>();
}
}
你可以试试最新的? – 2011-07-19 08:08:20