entity-framework-migrations Questions
2
Solved
EF Core 5 has various events, but they relate to DbContext. There are no events related to migrations (Migration).
I want to run custom code after all migrations are applied - whether triggered by ...
Brownstone asked 11/12, 2021 at 4:53
2
Solved
I'm using ASP.Net 4 EF 4.3.1 Code First Migrations.
I have an existing model class. I've added a property to it:
public DateTime LastUpdated { get; set; }
When I run update-database -force -ver...
Kent asked 5/6, 2012 at 22:43
3
Failed to create an editor. the parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
Error
Script-Migration -From "PreviousMigration"
the Update Visual Studio Commu...
Hither asked 15/2 at 12:26
5
Solved
I'm developing a plugin application with EF6, code first.
I have one main context with an entity called User:
public class MainDataContext : DbContext
{
public MainDataContext(): base("MainDataC...
Negligible asked 15/1, 2015 at 17:53
9
Using VS Community 2017. I have tried to create initial migration with error message saying:
Both Entity Framework Core and Entity Framework 6 are installed. The Entity Framework Core tools are...
Cristal asked 11/10, 2017 at 3:15
3
Solved
I'm using code first migrations. Is there a way to display pending model changes in package manager console before I scaffold a new migration?
Bromoform asked 11/8, 2013 at 0:6
9
Solved
I have an ASP.NET MVC3 project that uses Entity Framework 4.3 with the code-first approach. I use Migrations to keep the database up-to-date.
The project is under source-control and I have a numbe...
Sang asked 11/5, 2012 at 17:59
7
Solved
Code First Environment
I'm trying to update the database from package Manager console. If my domain class changes, I have to drop and create the database. Instead of dropping the database, how can ...
Soundboard asked 25/8, 2015 at 4:50
3
I'm calling the HasData method (see below) for an entity that has an Id (Identity) column, but no data is inserted into the table the first time the Migration runs.
When the TestObject model was no...
Lui asked 19/12, 2020 at 21:4
5
Solved
I'm using Entity Framework 5 in a project, and I've got Migrations enabled.
Here's the scenario:
A new developer (dev1) comes on and builds the project from source. There are existing migrations...
Llovera asked 11/1, 2013 at 17:4
2
Solved
I'm working in a project that uses EF Code First. I'm trying to use migration features. I don't want to use Package Console Manager. How can I execute the "Add-Migration" and "Update-Database" prog...
Manella asked 2/2, 2016 at 3:58
4
Solved
I am new to EF5 Code First and I'm tinkering with a proof-of-concept before embarking on a project at work.
I have initially created a model that looked something like
public class Person {
publ...
Grader asked 12/2, 2013 at 16:28
31
I have 2 projects in my solution, I have a project with Entity Framework Core installed:
And in the other ASP.NET Web API project I have these packages:
<?xml version="1.0" encoding="utf-8"?...
Ovenbird asked 27/9, 2018 at 12:3
23
I am working on a project with ASP.NET CORE 1.0.0 and I am using EntityFrameworkCore. I have separate assemblies and my project structure looks like this:
ProjectSolution
-src
-1 Domain
-Projec...
Kozhikode asked 1/8, 2016 at 18:29
4
Solved
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 i...
Agriculturist asked 18/12, 2012 at 18:44
30
Solved
I have 4 projects :
Toombu.Entities : all models are there
Toombu.DataAccess: Mapping, Repository and ToombuContext
Toombu.Logique : Logic of my application
Toombu.Web : MVC 4 application. With all...
Extrasystole asked 11/5, 2013 at 14:9
3
This is as close as I've got...
public static class Helpers
{
public static bool TableExists(this MigrationBuilder builder, string tableName)
{
bool exists = builder.Sql($@"SELECT 1 FROM sys.ta...
Haslam asked 2/10, 2017 at 18:39
6
Solved
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 th...
Desist asked 1/6, 2012 at 10:37
18
Solved
This looks like a really common task, but I can't find an easy way to do it.
I want to undo the last applied migration. I would have expected a simple command, like
PM> Update-Database -Targ...
Convenience asked 10/8, 2012 at 15:14
3
Solved
I realised that I had spelt one of my column headers incorrectly so I changed it in the model and created a new migration to update it into the database. All worked perfectly until I realised that ...
Brucebrucellosis asked 4/5, 2018 at 15:30
14
Solved
I am using Visual Studio 2015 and dotnet core and trying to develop an EF Core Code First project using Sqlite and this documentation / tutorial, which also uses Sqlite => NET Core - New Database
...
Lard asked 24/3, 2017 at 5:0
1
Does anybody know how to generate entity framework code first migrations without having to use the package manager console?
I'm having a significant problem whereby on occasion running add-migrati...
Hepato asked 8/6, 2015 at 13:14
3
Solved
I'm having ASP.NET MVC 3 project that uses Entity Framwork 4.3 and its migrations. Now I want Entity Framework to create a database for me using migrations that I have already.
When I trying to run...
Indrawn asked 23/5, 2012 at 11:3
39
Solved
I have a developer that is getting "Build failed." when running add-migration in a .NET Core EF project, with no explanation of why the build failed. How do you troubleshoot this error?
This is wh...
Hasen asked 27/6, 2017 at 16:33
2
Solved
I have been trying to follow this tutorial ... http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/creating-an-entity-framework-data-model-for-an-asp-net-mvc-application but I keep g...
Neurasthenia asked 2/7, 2014 at 23:20
1 Next >
© 2022 - 2024 — McMap. All rights reserved.