Questions tagged [ef-model-first]
231 questions
1
vote
1 answer
Did I write right queries to database with inheritance?
I am learning EF and Model First approach. I have a table, which has inheritance.
Here it is my EDM scheme: http://gyazo.com/fbec21b5fbfc47dd76ff3eaa38f86d36.png
I am not sure about my queries, INSERT, UPDATE and DELETE. Am i right?
private…

BJladu4
- 263
- 4
- 15
1
vote
1 answer
Entity Framework Model First and Inheritance
I am using Model First to create my database with Entity Framework 6.
I have a class as follows:
public partial class User : IdentityUser
{
}
Where User is a class generated by EF in the designer. However, how can I map the in inherited properties…

William
- 3,335
- 9
- 42
- 74
1
vote
0 answers
ASP.NET Identity: Inheritance with Code First vs. Model First
I have been using ASP.NET Identity Code First and I wanted to check out Model First.
One thing that I have run into: how do I add something as a base class to an entity in Model First when the base class does not exist as a table?
For instance, with…

William
- 3,335
- 9
- 42
- 74
1
vote
0 answers
Entity Framework model first: update data model of live database
I am using ASP.Net with Entity Framework. My web forms application has gone live some time ago and now I have to write some extensions for the application. This includes updating the data model (add new columns, tables, etc.). The question is:…

Cleo
- 620
- 2
- 10
- 32
1
vote
1 answer
Bounded Context with EF Model-first
I am trying to find a best way to work using Entity Framework and found a recommendation to not have a big models (separate them by intent) because it can make application more complex to maintain and can have an impact on performance
According to…

Prokurors
- 2,458
- 3
- 40
- 65
1
vote
1 answer
Entity Framework Model first: adding an association without creating foreign key properties?
I'm playing with the Entity Framework model designer, and I've got a question about creating entity associations:
In the "create association" dialog, when I create a 1:many association, it offers this checkbox:
"Add foreign key properties to the…

BenjiFB
- 4,545
- 10
- 46
- 53
1
vote
1 answer
Entity Framework with Model-First and Oracle
I'm trying to use Entity Framework with Model-First on an Oracle database. I have installed ODP.NET and the Oracle Visual Studio Tools from the file ODTwithODAC1120320_32bit.zip, which is version 11.2.0.3.20.
I made a small test model, set the…

Jonas Sourlier
- 13,684
- 16
- 77
- 148
1
vote
1 answer
Entity Framework generated code raises warnings in Code Analysis
FxCop analysed the auto-generated code in edmx files...
This bug is already known: Mircosoft Connect.
The only solution proposed there is from 2010 Customizing the Entity Framework T4 Template, suppressing code analysis.
Do you know some better…

MikroDel
- 6,705
- 7
- 39
- 74
1
vote
1 answer
Entity Framework Code First Customer and Address Registration
one for customer, and one for address.
Required Functionality When a customer registers, they enter their personal details such as name, tel as well as their address details in the same view.
Current Functionality
At present, EF scaffolding provides…

Gravy
- 12,264
- 26
- 124
- 193
1
vote
1 answer
Fix Entity Framework inconsistent FK underscore
I'm fine with FK names of "Table_Id" OR "TableId" in my table. But the Entity Framework SQL generator is using both.
Mapped associations (independent associations, FK properties visible): no underscore
Constrained associations (foreign key…

shannon
- 8,664
- 5
- 44
- 74
1
vote
1 answer
Get entity facets and other metadata on runtime
I have .NET 4.0 WinForms Application, and I use Entity Framework 5 with Model First Approach. In VS EF Designer, I have created a dozen or so entities with a lot of scalar properties of String type, then in Properties Toolbar I have configured…

sgnsajgon
- 664
- 2
- 13
- 56
1
vote
1 answer
How to change navigation property return type
I read the following article about EF5 Databinding with WinForms.
I use VS2010, .NET 4.0 and EF5 Model First approach, and I don't know how to change navigation property return type in VS2010 EF Designer, without changing auto-generated entity…

sgnsajgon
- 664
- 2
- 13
- 56
1
vote
1 answer
Associations strange behavior
I found a following issue regarding EF5 running under .NET 4.0, in Model First approach:
I have following auto-generated entity:
Partial Public Class Notice
Private _id As Integer
Public Property id As Integer
Get
…

sgnsajgon
- 664
- 2
- 13
- 56
1
vote
1 answer
Linq trowing Exceptions
I create a project where I use EF with LINQ and Model first. So, based on my edmx I created my Database and also my classes.
So I got some problems. I created a Click to test if my code is working.
protected void btnSearch_Click(object sender,…

Michel Ayres
- 5,891
- 10
- 63
- 97
1
vote
1 answer
EF model first with MVC Repository Pattern
Attempting to create an MVC project using EF and the Model first approach.
In order to implement it in a way that the Web and data portions are loosely coupled I'm attempting to implement the repository pattern, but, after reading many articles I'm…
user773423