Linked Questions

16 questions linked to/from How to auto create database on first run?
0 votes
1 answer
210 views

I'm having an issue with Entity Framework Core while trying to use the code-first approach. I want the database to be automatically created when I run the code, but it's not happening. If I don't ...
19 votes
3 answers
33k views

I know I can use the following command to add a new migration and create the database : dotnet ef migrations add MigrationName -c DbContextName dotnet ef database update -c DbContextName but I need ...
2 votes
2 answers
11k views

Here is my code: public void ConfigureServices(IServiceCollection services) { services.AddDbContext<AppDbContext>(options => { options.UseSqlServer(Configuration....
user avatar
3 votes
1 answer
8k views

I'm using EF Core in my Winforms application but I can't generate database automatically without migrations. I read this articles but It is for asp.net core: auto create database in Entity Framework ...
2 votes
1 answer
4k views

I have a simple Web API and I am trying to use entity framework core code first, with an external sql server database hosted on AWS RDS. My aim is for EF to create my model database/tables ...
0 votes
1 answer
1k views

I'm creating a web app that will allow users to log in to execute certain actions. I followed this tutorial (for simplicity, you can search for "Generate the database to store membership data" for the ...
0 votes
1 answer
2k views

I want to automatically create the database and table structures when my desktop app is first run. I can't find any examples or documentation on something equivalent for EFCore. I did everything as ...
3 votes
2 answers
649 views

I am using local database in my app and when I generate installation file (By Installer Package), after installing program it gives database path errors. Eample an attempt to attach an auto-named ...
1 vote
0 answers
1k views

I am working with Entityframework Code-First and trying to get my tables to drop and then recreate at every startup. However Database.SetInitializer is not recognized and intellisense is not giving me ...
0 votes
1 answer
1k views

So I have a ton of migration files like this that work and apply their changes when I start the application locally no problem whatsoever. I also have defined my connection strings and database name ...
0 votes
1 answer
918 views

I am new to ASP.NET Core and using Entity Framework 6. I have created a Web API using MySql. On development, I have executed add migrations and update-database command. Now, I have published the Web ...
0 votes
1 answer
970 views

Exception in EF Core 7 / SQLite with a code-first approach : Table does not exist Code is here with issue detail: https://github.com/HumairaSid/EFCoreBasicCaching I'm trying to create a SQLite ...
1 vote
1 answer
445 views

What's the best approach to create a database in EF core programmatically and then run the migrations to make sure the new database has all database objects? We're building a SaaS based application ...
0 votes
0 answers
403 views

I am writing an api using aspnet identity, on configuring services I use .AddDbContext methdos but nothing happens. The construcotr of AppDBContext is not invoked. I set a breakpoint in AppDBContext ...
0 votes
0 answers
321 views

I have searched high and low for a fix for this and cannot find one that works in my case. I've setup a new project using Razor Pages with no authentication. Made a change to a model, so added a ...
James's user avatar
  • 1,501

15 30 50 per page
1
2