Questions tagged [ef-model-first]
231 questions
0
votes
1 answer
DbUpdateConcurrencyException even when the passing key in delete view
I am very confused as to why this started happening as I had fixed the problem already. When this problem first occurred I did not have @Html.HiddenFor(model => model.OrganizationID) being passed through the POST action of the form. After I put that…

cfisher
- 235
- 3
- 17
0
votes
1 answer
Create database and add to Visual Studio solution
I am creating a database with Entity Framework 4 and Visual Studio 2010.
I am fine with the first steps - I am going model first, so I successfully created the model and now there is a valid .edmx file in my solution.
My goal is the following: I…

Evgeny
- 3,320
- 7
- 39
- 50
0
votes
2 answers
How to check unique constraint using EF model first approach?
I'm developing website using MVC3 using model first approach.
I have a field in my "Employee" model that is "username". And this field is neither a unique field nor foreign key. my application requirement is username should be unique, and if user…

Priyanka
- 2,802
- 14
- 55
- 88
0
votes
1 answer
Adding reference to entity causing Exception
I have a model as shown below (created using Model-First approach).
A book is a selling item. A DigitalDisc is a selling item. This is working fine and data is getting inserted correctly in database.
I am adding a new entity named “Purchase”. One…

LCJ
- 22,196
- 67
- 260
- 418
0
votes
1 answer
EF Model First Entity Key Property Name Duplication
I'm taking a stab at the model first approach and I am running into an annoyance. If I have an entity named Building with a key property named BuildingID, for example, and I create an association to a Room entity, the foreign key property in the…

Erik
- 279
- 1
- 3
- 14
0
votes
1 answer
how to use create view for different purpose?
I'm new to ASP.NET MVC3. I have created one project in ASP.NET MVC3 using Model First approach.
I'm having following entities: Customer and Call
Relation between these entities are one (Customer) has many (Calls). I created controllers for both of…

Priyanka
- 2,802
- 14
- 55
- 88