db-first Questions
3
Solved
In an existing project, how do I know if it's code-first or database-first?
Project has this lines of code:
public class TestDBContext : DbContext
{
public DbSet<Player> Players { get; set...
Manny asked 11/5, 2017 at 14:29
1
Solved
Is it possible to configure/pass connection string to the DbContext in the constructor?
public partial class MyContext : DbContext
{
public MyContext() { }
public MyContext(DbContextOptions<My...
Klein asked 18/8, 2020 at 8:33
1
Solved
I'm using this code for creating foreign key:
Create.ForeignKey("FK_Table1_Table2")
.FromTable("Table1").ForeignColumn("Table1_ID")
.ToTable("Table2").PrimaryColumn("Table2_ID");
And as a resu...
Ghost asked 22/4, 2019 at 8:19
1
Solved
I have been searching on EF Core documentation, if adding .HasIndex() on your entities mappings would bring any benefits on a DbFirst scenario, and I couldn`t find anything.
I have this 20yo DB th...
Astromancy asked 21/1, 2019 at 23:9
1
I try to use EF with MySQL in my project. And I add:
MySql.Data.EntityFrameworkCore
MySql.Data.EntityFrameworkCore.Design
into my project.json but the tools section of project.json is empty. ...
Floorman asked 1/3, 2017 at 6:59
1
Solved
Environment:
I am working in DB First Approach. I am having 3 tables in my database. All these tables have status field to indicate the record status. This is an integer field.
Scenario:
I crea...
Implicit asked 1/3, 2017 at 10:17
1
© 2022 - 2024 — McMap. All rights reserved.