Hi
I have tried Breeze with an existing EF implementation that was developed DB first.
I get an error _contextProvider.Metadata();
Creating a DbModelBuilder or writing the EDMX from a DbContext created using Database First or Model First is not supported. EDMX can only be obtained from a Code First DbContext created without using an existing DbCompiledModel.
Originally I had the EDMX file in a separate Data Access Layer but have also tried it locally but still get same error
Any advice ?
Stack Trace
at System.Data.Entity.Infrastructure.EdmxWriter.WriteEdmx(DbContext context, XmlWriter writer)
at Breeze.WebApi.EFContextProvider`1.GetCsdlFromDbContext(DbContext dbContext)
at Breeze.WebApi.EFContextProvider`1.GetJsonMetadataFromDbContext(DbContext dbContext)
at Breeze.WebApi.EFContextProvider`1.Metadata()
at UsingBreeze.Controllers.BreezeSampleController.Metadata() in d:\ModuleChooser\UsingBreeze\Controllers\BreezeSampleController.cs:line 19
at lambda_method(Closure , Object , Object[] )
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass13.<GetExecutor>b__c(Object instance, Object[] methodParameters)
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments)
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.<>c__DisplayClass5.<ExecuteAsync>b__4()
at System.Threading.Tasks.TaskHelpers.RunSynchronously[TResult](Func`1 func, CancellationToken cancellationToken)