Questions tagged [ef-model-first]
231 questions
2
votes
1 answer
Entity Framework Model First: how to create association with properties
I am trying to create data model for a graph with Node and Edge. If Edge does not contain any property I can simply create many-to-many association from a Node to itself. However I want to store some properties on the Edge e.g. Distance. I tried to…

NS.X.
- 2,072
- 5
- 28
- 55
2
votes
3 answers
Update Database from Model (when model changed)?
I'm developing an application (for my education, not commercial) using MVC3 and Model First approach.
I created a model and generated the SQL CE 4 database from it.
Next, I may need to change my model - i.e. add a column to a table, which is not a…

Evgeny
- 3,320
- 7
- 39
- 50
2
votes
1 answer
Changing naming of generated files in T4
Is there anyway that I can change the naming of the files generated by T4 with Entity Framework Model First
I have tried to change the output extension to this:
<#@ output extension=".Generated.cs"#>
that changed the name of the Model1.cs file to…

Henrik Stenbæk
- 3,982
- 5
- 31
- 33
2
votes
2 answers
Entity Framework 4.0 Model First inheritance is lost after updating model from database
In my application I'm using Entity Framework 4.0 Model First.
I have several tables that implement inheritance, like Product as a basetable and SpecificProduct that inherits from Product.
The inheritance is visible in the edmx file. To initially…

citronas
- 19,035
- 27
- 96
- 164
2
votes
0 answers
Storing a attribute with JSON value in CosmosDB using Entity Framework Core 3
I using EF Core Cosmos Provider in my API to consume my CosmosDB. Inside my container items in cosmos , I want a Attribute to store JSON value and also should be mapped to my models classes in EF core. Items in my cosmos container looks like…

Mradul Karmodiya
- 21
- 4
2
votes
0 answers
Model-First approach options in Python ORMs(and Code-First)
I have a project that contains work with complex excel file(bank balance sheet), db and web interface. Naturally I would like to design diagram visually to autogenerate sql(Model-First approach in Entity framework), but I was rather surprised and…

Stan
- 21
- 3
2
votes
1 answer
How to use Many-to-Many relationship in Model First Asp.net MVC?
I'm new to MVC,
and this confusing me for a long time but seems few questions discuss about this.
I'm using Model first creating Database in ASP.NET MVC.
If I want a Member relationship between User and Project ,
means which user has joined…

OOD Waterball
- 707
- 1
- 11
- 31
2
votes
1 answer
Adding Property to Model in CodeFirst entity framework for an existing column in db
I am using Entity framework Model First approach with MySQL db. I am having a column in the database, but the property is not there in Model. SO now my problem is I need it to be added to Model and get it populated when data is retrieved from DB. SO…

Phani
- 181
- 1
- 2
- 13
2
votes
2 answers
How to add navigation property manually model first
I have a table with books and a table with authors created by model-first.
There's a navigation property in Books table pointing to AuthorID
(because each book has an author)
here i'm trying to fill in the tables with values and it's okay when it…

David Shepard
- 181
- 2
- 10
2
votes
2 answers
EF 6 Code First : "CREATE DATABASE permission denied in database 'master'." on existing database
I'm facing some troubles with my EF Model.
History: When my app was released in production a few years ago, my EF model was created via the Model First (edmx) technique. I works well on my production server with my SQL SERVER db.
Now I'm doing some…

Yoann B
- 123
- 2
- 12
2
votes
1 answer
If you generate a database using EF, do you also use EF to manage the database?
"Manage" as in, make changes to the tables.
If yes, how does this work with multiple developers and multiple copies of the database (for development/production)?

BlueRaja - Danny Pflughoeft
- 84,206
- 33
- 197
- 283
2
votes
1 answer
Entity Designer Database Generation Power Pack generates datetime and not datetime2 for ProviderManifestToken = 2008
Im having trouble with the DDL-generation from EDMX using the "Entity Designer Database Generation Power Pack" add-on. It generates datetime-columns instead on datetime2 even though ProviderManifestToken is set to 2008. Can it be fixed? I don't want…

Andreas Zita
- 7,232
- 6
- 54
- 115
2
votes
2 answers
Model First database generator freezes my Visual Studio
I'm new to the Entity Framework, and I know this is not suppose to happen, but maybe it is a known issue in the community so I thought I'd ask.
I created my model with 2 entities. When I wanted to create the database tables Visual Studio froze on…

sebagomez
- 9,501
- 7
- 51
- 89
2
votes
3 answers
Model first vs Data first in EF
Which one should I choose for new project? Could I assume, that data-first model provides better DB performance, and model-first provides better OOP handling?

kofucii
- 7,393
- 12
- 51
- 79
2
votes
1 answer
Adding an entity (and respective table) to EF DB-first model
I'm pretty new to Entity Framework: I started from a database-first model to maintain an application created using a strange mixture of EF and plain old SQL.
I created my own fresh DB-first model and I'm fine with it. Today my boss asked me to add a…

usr-local-ΕΨΗΕΛΩΝ
- 26,101
- 30
- 154
- 305