EF6和Breeze 1.4.6(已废弃)不适用于hottowel项目

时间:2013-11-29 00:09:29

标签: asp.net-mvc entity-framework breeze hottowel

我使用VS2013创建了一个Asp.Net MVC并使用nuget添加HotTowel(2013年9月11日的V2.0.1)。我创建了几个ViewModel,Models。但是,我收到了以下错误。

听起来“Breeze Server(已废弃)”和EF6存在问题。但是,当我尝试安装非过时的Breeze for EF6时失败了。

安装EFV版本的微风错误。

Installing 'Breeze.WebApi2.EF6 1.4.6'.
Successfully installed 'Breeze.WebApi2.EF6 1.4.6'.
Install failed. Rolling back...
Updating 'Microsoft.AspNet.WebApi.OData 4.0.30506' to 'Microsoft.AspNet.WebApi.OData 5.0.0' failed. Unable to find a version of 'Breeze.Server.WebApi.Core' that is compatible with 'Microsoft.AspNet.WebApi.OData 5.0.0'.
readonly EFContextProvider<ApplicationDbContext> _contextProvider = new EFContextProvider<ApplicationDbContext>();

[HttpGet]
public string Metadata()
{
    return _contextProvider.Metadata(); // Error occurred here.
}
System.MissingMethodException was unhandled by user code
  HResult=-2146233069
  Message=Method not found: 'System.Data.Objects.ObjectContext System.Data.Entity.Infrastructure.IObjectContextAdapter.get_ObjectContext()'.
  Source=Breeze.WebApi.EF
  StackTrace:
       at Breeze.WebApi.EF.EFContextProvider`1.GetMetadataFromDbContext(Object context)
       at Breeze.WebApi.EF.EFContextProvider`1.GetMetadataFromContext(Object context)
       at Breeze.WebApi.EF.EFContextProvider`1.BuildJsonMetadata()
       at Breeze.WebApi.ContextProvider.Metadata()
       at ST13a.Controllers.BreezeController.Metadata() in c:\Users\nick\Documents\Visual Studio 2013\Projects\ST13a\ST13a\Controllers\BreezeController.cs:line 25
       at lambda_method(Closure , Object , Object[] )
       at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.c__DisplayClass10.b__9(Object instance, Object[] methodParameters)
       at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments)
       at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)
  InnerException: 

1 个答案:

答案 0 :(得分:2)

您使用的是Durandal HotTowel吗?如果是这样,我们(约翰和我)还没有更新,以应对与11月VS 2013版本相关的变化。我们落后了。还没有解决方法。请继续关注。