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

Entity Framework 6 - Knowledge Base (KB)

122 results in tag: code-first-migrations

Error loading type 'System.Data.Entity.Infrastructure.DbContextInfo' in EF Migrations

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

How to use EntityFramework Code first Migrations to seed data

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.

Entity Framework Code First Migration Exceptions

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

Up/down migration of C# Code-First?

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

Where can I locate the console or debug output from the package management window's code?

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

Multiple Database / DbContext Migration with EF Code First

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

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

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

EF Code First Migrations: MigrateDatabaseToLatestVersion without NUGET

I need help to clarify how EF Code First Migrations works on production machine. I've some entity classes and DbContext-derived class to access entities. Now, I want to perform these several things:...when my application starts, it must create database, i...
c# ef-code-first ef-migrations entity-framework
asked by Dennis

Entity Framework 5 Nuget Console commands

So I am making a DB with EF 5 Code first, I have checked some guides and found some "important"/useful commands like: "Update-Database -Force -Verbose". However I know there must be more commands like these, something like: "Purge-Database", but no succes...
command-line ef-migrations entity-framework nuget
asked by Maximc

An error occurred while getting provider information from the database

Getting the error:...System.Data.ProviderIncompatibleException: An error occurred while getting provider information from the database. This can be caused by Entity Framework using an incorrect connection string.... Check the inner exceptions for detail...
connection-string ef-migrations entity-framework
asked by user1538467

Enabling Code First Entity Framework VS Web Express 2012

I am trying to enable Code First in my Visual Studio Web Express 2012. From what I have read so far I have to use the Package Manager Console and the command Enable-Migrations. When I do this I get the following error. ...Exception calling "LoadFrom" wit...
asp.net ef-migrations entity-framework visual-studio-2012
asked by jackncoke

Update-Database tries to do an automatic migration even with automatic migrations disabled

I work on a team of 4 developers using EF5, everyone working on their own local database. Up until now we've been using automatic migrations but we're nearing the point where we need to release to production so we've disabled automatic migrations and star...
ef-migrations entity-framework
asked by Dave Graves

Database Initializer not being called in EF 5 + MVC 3

I know this question might be duplicated, but I haven't found any solution for my problem yet....I have:...protected void Application_Start() { Database.SetInitializer(new DatabaseSeeder()); DatabaseContext c = new Database...
asp.net-mvc ef-code-first ef-migrations entity-framework
asked by TapiocaCom

Code First Migrations for a custom NuGet package can't be executed from main application

I have created a module to be included in a main MVC3 web application. The module is packaged into a NuGet package and it can be installed and uninstalled via NuGet. Both, the main site and the module use Code First, EF >= 4.3...To create the package I ha...
code-first ef-migrations entity-framework
asked by Alfonso Muñoz

What is the data annotation for changing nullable and not null data types?

I reckon this should be simple for experienced programmers but here it goes. I am working on a project using entity framework code first.I have also enabled migrations and set to auto (Lovely feature)....I stupidly declared one of the datatype wrong in my...
asp.net-mvc-4 c# ef-migrations entity-framework visual-studio-2012
asked by Komengem

How to add a new code-first migration with a newly-generated database?

I've enabled code-first migrations on my entity framework project, and have added several migrations which do things like rename tables. However, I have now deleted the database and caused entity framework to generate a brand new database based on my lat...
data-migration ef-code-first ef-migrations entity-framework sql-server
asked by Jez

Migrations in Entity Framework in a collaborative environment

We have multiple developers working on a project that uses Entity Framework 5.0. Every developer uses his own local SQL 2012 database so he can develop and test without impeding others....At first, we used a hybrid of automatic migrations and code-based m...
c# collaboration ef-migrations entity-framework migration
asked by JulianR

Re-create table with Entity Framework 5 and nuget

I am using Code First to create a table. ...I created the class, the mapping file and issued the add-migration command in nuget and then the update-database command...I then changed the class and like an idiot deleted the table....I deleted the migration...
ef-migrations entity-framework nuget
asked by James Helms

Generate full SQL script from EF 5 Code First Migrations

How do I use Entity Framework 5 Code First Migrations to create a full database script from the initial (empty) state to the latest migration?...The blog post at ...MSDN Blog... suggests to do this, but it seems to create an empty script:...Update-Databas...
ef-migrations entity-framework
asked by Matt Wilson

Page 1 of 7
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • »

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
Get monthly updates by subscribing to our newsletter!
SUBSCRIBE!