zzz projects Entity Framework 6 EF 6
Home EF Core 5 Articles Knowledge Base Online Examples
  • Home
  • EF Core 5
  • Articles
  • Knowledge Base
  • Online Examples

Entity Framework 6 - Knowledge Base (KB)

249 results for: in tag: ef-migrations

GUID COMB strategy in EF

Is there any way to implement the Guid COMB identity strategy for objects in the new Entity Framework 4.1 using the CodeFirst design? I thought setting the ...StoreGeneratedPattern... would work, but it still gives me normal GUIDs.
c# ef-migrations entity-framework guid newsequentialid
asked by Ciel

EF Migrations error: could not load type 'System.Data.Entity.Infrastructure.DbContextInfo'

I am using ContosoUniversity example. I have just used Nuget to download and install code first migrations pakage. Whe I excecute ...update-database... command it throws an error . Is there anything to do more than installing nuget package?...Update-Datab...
code-first ef-migrations entity-framework
asked by Jayantha Lal Sirisena

update-database error - NuGet Package (EntityFramework.SqlMigrations)

i installed EntityFramework.SqlMigrations NuGet Package and i get this error . it worked for me in the past and somehow, now it does not work....PM> update-database The term 'update-database' is not recognized as the name of a cmdlet, function, script fi...
ef-migrations entity-framework nuget-package
asked by mordechai

How to seed data using EntityFramework Code first Migrations

Hi I'm using the Beta 1 version of this nuGet package, the database is allready created and I need to know if there is a way to populate my tables through migrations. Thanxs
asp.net ef-code-first ef-migrations entity-framework
asked by Guillermo Oramas R.

How to seed data with many-to-may relations in Entity Framework Migrations

I use entity framework migration (in Automatic migration mode). Everything is okay, but I have one question:...How should I seed data when I have many-to-many relationships?...For example, I have two model classes:...public class Parcel { public int I...
ef-code-first ef-migrations entity-framework
asked by Dmitry Gorshkov

How to explicitly name the database when using Entity Framework Migrations 4.3

I've recently started using Entity Framework migrations and noticed that the database name is not pulling through for me when I run the ...Update-Database... command....My connectionstring is:...<connectionStrings> <add name="DataContext" connectionString...
ef-migrations entity-framework
asked by Richard Reddy

Exceptions for Entity Framework Code First Migrations

I'm getting several unhandled exceptions while using Code First Migrations of Entity Framework 4.3. ...The database context:...public class MyAppContext : DbContext { public DbSet<Branch> Branches { get; set; } public MyAppContext() { } } ...The...
c# ef-migrations entity-framework
asked by Alexander van Trijffel

C# Code-First migration, up/down?

Started to use the add-migration command in the package manager console to generate the migrations for my model. My question is, the up and down method. I assume that the purpose of the down method is to remove all dependencies and drop the tables if they...
c# code-first ef-migrations entity-framework
asked by Patrick

Unable to generate an explicit migration in entity framework

I am adding a new migration but this message shows:...Unable to generate an explicit migration because the following explicit migrations are pending: [201203170856167_left]. Apply the pending explicit migrations before attempting to generate a new e...
ef-migrations entity-framework
asked by Noman Saeed

Where can I find the console or debug output from code executed in the package manager window?

I'm using EntityFramework code first with migrations. From the package manager console, I'm running "update-database". This executes Configuration.Seed(context) which I have overridden.... protected override void Seed(WebContext context) { ...
ef-code-first ef-migrations entity-framework nuget
asked by DanielEli

Lose EF Code First Migration when working on different TFS branches?

We are using TFS and have different branches for our Dev....in the branch A we made a migration to change a column size...in the branch B we made a migration to add a new table. This branch doesn not know about the branch A modification !!...both modifica...
.net coldfusion ef-code-first ef-migrations entity-framework
asked by bouh

MVC3 and Code First Migrations - "model backing the 'blah' context has changed since the database was created"

I started off my project by using Entity Framework Code First. When I was ready I uploaded my database and code to my host provider. Everything worked....I need to add a new field to one of my classes and I don't want to loose the data in the database. Th...
asp.net-mvc-3 ef-migrations entity-framework
asked by Scott Dietrich

Script EF migration seed from Configuration class

I have EF migrations working nicely, but I also want to generate the sql script for the seed data from my DbMigrationsConfiguration class. The seed data runs ok when I do Update-Database, but when I do UpdateDatabase -Script I do not get the sql for the s...
ef-migrations entity-framework
asked by Ian1971

EF Code First Migration with Multiple Database / DbContext

I have two database each with their own dbcontext. I've setup two migration configurations. I can add a migration for the first db ust fine (...Add-Migration DB1_InitialCreate -ConfigurationTypeName DB1Configuration...). When I try to create an initial mi...
code-first ef-migrations entity-framework multiple-databases
asked by seano288

How to use migrations on an existing db in production created using Entity Framework 4.1?

I have a system in production which was created with Entity Framework 4.1 Code First. Now, I have upgraded to 4.3 and need to apply migrations, but there's several use cases I need to cover:...A new developer needs the database created from scratch with ...
ef-migrations entity-framework
asked by Josh Kodroff

Entity Framework Migrations - Enable AutoMigrations along with added migration

I'm utilizing Entity Framework 4.3 Migrations in my project. I would like to use Automatic migrations so that when I make modifications to my domain objects and my context class, my database automatically updates when I run the project. I have this work...
asp.net-mvc-3 c# ef-migrations entity-framework
asked by jdavis

Automatic Migration vs Code-base Migration

I'm learning EF4.3 Migration, and I have read these two articles from ado.net team blog: ...http://blogs.msdn.com/b/adonet/archive/2012/02/09/ef-4-3-code-based-migrations-walkthrough.aspx...http://blogs.msdn.com/b/adonet/archive/2012/02/09/ef-4-3-automati...
ef-migrations entity-framework
asked by James

Using Entity Framework (code first) migrations in production

I'm just looking into using EF migrations for our project, and in particular for performing schema changes in production between releases. ...I have seen mentioned that there is an API to perform these migrations at run-time using the ...DbMigration... cl...
.net ef-code-first ef-migrations entity-framework
asked by devdigital

How can I stop Add-Migration checking my database has no pending migrations when using Code-Based migrations?

I'm investigating using Code-Based EF Migrations for a product that ...does not... use EF. Everything generally works well, except that the command:...Add-Migration MyTestMigration ...outputs the following message:...Unable to generate an explicit migrati...
.net c# ef-migrations entity-framework
asked by Danny Tuppeny

EF Code First DbMigration without nuget

How to migrate DB without nuget? It is not possible to use Visual Studio with nuget in production environment. Currently, many examples only teach us to use Visual Studio with nuget. How to use the generated DbMigration classes?
ef-code-first ef-migrations entity-framework
asked by linquize

Page 1 of 13
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • …
  • »
  • »»

Prime Library

Performance

  • Entity Framework Extensions
  • Entity Framework Classic
  • Bulk Operations
  • Dapper Plus

Expression Evaluator

  • C# Eval Expression
  • SQL Eval Function
More Projects...

Related

  • EF Extensions Online Benchmark
  • WIN an EF Extensions license
  • EF6 BatchSaveChanges for only $79
Save your entities 20× faster with EF Extensions
SaveChanges vs BulkSaveChanges

EF Extensions
Try for free now