Is it possible to change the name of the history table that the migration framework uses?
I found this: http://entityframework.codeplex.com/wikipage?title=Migrations%20History%20Table%20Customization
but I cannot derive the HistoryContext on version 4.5 of the .Net framework.
Could someone provide an example if possible?
Thanks
HistoryContext is still available to derive from. It is in the following namespace:
System.Data.Entity.Migrations.History
It is contained in the EntityFramework assembly. I can see that this is true for EntityFramwork 6. Perhaps you are using an older version? Ensure you've updated the NuGet package.
Related
In EF Core, OnModelCreating scaffolds the entire database, but I don't see a way via the model builder to define a TTL; It seems like I would have to delete the container that gets created by EF Core.
Does anybody know of a better solution?
Eoleary. Although there is full support for Entity Framework Core and Cosmos DB including the EF Core Azure Cosmos DB Provider with almost full support for the CosmosClientOptions Class. The TTL component will not be available until v. 6.0 dotnet\efcore nugget package at the earliest. You can track this through the following dotnet\efcore Git Issue: Cosmos: Configure TTL per entity/entity type/collection
Version 3.1.9 is GA and version 5 release candidate is here. Additional information can be found on the dotnet/efcore project repository.
It looks like this is possible now. https://learn.microsoft.com/en-us/ef/core/what-is-new/ef-core-6.0/whatsnew#configure-time-to-live
modelBuilder.Entity<Family>(
entityTypeBuilder =>
{
entityTypeBuilder.HasDefaultTimeToLive(100);
entityTypeBuilder.HasAnalyticalStoreTimeToLive(200);
});
I have used entity framework 5(ef5) with ado .net entity model for backend purposes. I just changed the project to ef 6 and i build the project it works fine .Now when i update a table using update from table datamodel.context.cs file and datamodel.tt everything related to entity shows error genearting output
I have also checked the packages installed Ef6.01 and EF 6.02 are installed .
I have surfed the net too .Couldnt get any solution .Can anyone please suggest some solution
I think it could be related to my following answer
Here, the problem was that the T4 templates were still from version 5
I created an empty project in VS2013 and added these packages:
DotNetOpenAuth.AspNet
Microsoft.AspNet.Providers.Core
Microsoft.AspNet.Providers.LocalDb
Microsoft.AspNet.Membership.OpenAuth
In the process, Entity Framework 5 was added to the project. I manually installed EF6 and now I get this error when I try to authenticate a user with an external provider:
"Method not found: 'System.Data.Objects.ObjectContext System.Data.Entity.Infrastructure.IObjectContextAdapter.get_ObjectContext()'."
I checked the DNOA documentation but it does not say a word about dependencies/requisites.
Does anybody know if DotNetOpenAuth can work with EF6?
DotNetOpenAuth does not have EntityFramework as a dependency. The samples however do use EF. You must have some of your own code that uses entity framework.
That said, it sounds to me like you need to add a binding redirect or jiggle your entityframework configuration a bit in your web.config file.
I'm trying to create a Breeze Web API controller and I'm wondering if it is possible with the default MVC/Web API project template that comes with Visual Studio 2013. Updating everything through the Nuget packet manager installs Entity Framework 6.0.1. Attempting to installing Breeze after that results in an error as it attempts to install EF 5 as a dependency, which is not possible given the fact that other parts of the template depend on EF6.
Do we have to wait for a new version of Breeze that works with EF6?
Edit: I want to do this the "breeze way" using [BreezeController] and Odata.
I just wanted to add that even without EF6.1, the MVC 5 updates released today with VS2013 also break breeze. It's hard to separate the pieces to determine which new piece is responsible. It could be MVC or the new odata. In any case, we anxiously anticipate the new version.
Updated 10/29/13
As of now, Breeze 1.4.5 has support for Microsoft's ASP.NET WebApi 2 and Entity Framework 6. Please see http://www.breezejs.com/documentation/download.
Older post:
We don't yet support EF6 but it is coming ... soon...
There is a new package called Breeze.WebApi2 that is compatible with Web API2 and EntityFramework 6. It makes some of the existing Breeze packages obsolete. See http://www.breezejs.com/documentation/start-nuget for details.
According to the following URL, there are three versions of the Entity Framework Storage Schema Definition Language:
http://msdn.microsoft.com/en-us/data/jj652016.aspx
I am developing a tool that should support all of them (including the legacy versions), but unfortunately I was not able find a document that describes the differences between them.
Does anyone know such document or able to describe the differences?
There are 3 main versions of EF artifacts (i.e. CSDL, SSDL and MSL). V1 was introduced in the first version of Entity Framework shipped as part of .NET Framework 3.5 SP1. V2 was introduced in EF4 shipped with .NET Framework 4. V3 was introduced in EF5 shipped with .NET Framework 4.5. V3 will also be used by EF6 that will not be shipped as part of .NET Framework but will be a standalone release - here is the project site http://entityframework.codeplex.com. Changes to artifacts (and therefore increasing the versions) are necessary when new features are added to the Entity Framework and it's not possible to use the existing versions to implement these features. I don't have a list of what changed between V1 and V2 but you can find the list of changes between v2 and v3 here: http://msdn.microsoft.com/en-us/data/jj650889. One way to find what changed is to compare schemas for v1 artifacts with corresponding schemas for v2 artifacts. You can find the schemas in System.Data.Entity.dll - they are embedded resources or on the http://entityframework.codeplex.com by browsing the EF6 code (under src/EntityFramework/Resources/System/Data/{EntityModel|MappingSpecification}) - the schemas have not changed since EF5.