ef-model-first Questions

3

Solved

I'm creating a new database with the model-first approach and I want to add a column to a table of the type System.Drawing.Color but I don't have this option in the properties list. Is there a way...
Dispassion asked 15/7, 2014 at 10:22

7

Solved

I have the following model-first (is that what it's called?) diagram that I have made. I use T4 to generate the classes. Now, I have a problem that causes Entity Framework to somehow append a "1...
Ironworks asked 20/2, 2014 at 12:12

4

Solved

In Entity Framework 5 model first, there seem to be some breaking changes due to the way the class files are generated (No more code generation, but T4 templates) 2 examples: The generated cont...
Seigniorage asked 20/9, 2012 at 7:39

3

Solved

How can I prevent the use of the parameterless constructor of the generated DbContext? var dcx = new DataEntities(); The default constructor is generated by the T4 template, and I thus cannot ov...
Discontinuation asked 28/7, 2014 at 9:46

6

Solved

I just upgraded to Entity Framework Core 2 and now I'm getting issues with an extra column existing and having a unique key even though it's not in my model and it's not defined anywhere else. The...
Gertrudis asked 26/9, 2017 at 23:23

10

Solved

I have problem, I have just started learning EF Model First and Im staying in one point for some time. I got such error : "An error occurred while updating the entries. See the inner excepti...
Gaiseric asked 13/6, 2014 at 22:59

2

I want to create a nullable foreign key with type GUID like this [ForeignKey("CreatedBy")] [Display(Name = "Created by")] public Guid? CreatedById { get; set; } public virtual User CreatedBy { g...
Incinerate asked 23/9, 2014 at 16:40

3

Solved

So I am learning MVC3 and EF4. I tried the code first method but it was too confusing for me.. I can create the classes no problem, but the hard part comes when dealing with foreign keys and the r...

2

This is a long question, but I would be very very thankful if I can get some good advice on this. In short, I’m looking for a good approach for version upgrade of MS SQL database schema that also d...

4

Solved

I've created a database model with model-first method using Entity Framework 4.0. I then created an sql script using the Generate Database from Model... I've also created an SQL Server Database fil...
Terrenceterrene asked 20/11, 2010 at 18:21

1

Solved

I have two tables with below structure : *Table User* id int identity username varchar role varchar *Table Ticket* id int identity admin_id int user_id int admin_id and user_id are the forei...

4

Solved

I give up. I found this: http://blogs.msdn.com/b/adonet/archive/2011/03/15/ef-4-1-model-amp-database-first-walkthrough.aspx And thought, that's cool. So I quickly redesigned my model to take advant...

0

This question is part of my following one I already asked roughly 2.5 years ago: Entity Framework (.NET) Round-Trip Modelling with Model First? I wanted to ask if in the meantime, the following is...
Plush asked 25/2, 2015 at 19:42

3

Solved

Im using EF4 in VS2010, POCO's and the model-first approach. My entity has the following properties: Id:Guid, Name:String, Created:DateTime, Modified:DateTime, Revision:Int32. I create my entity,...
Necktie asked 12/10, 2010 at 19:7

3

Solved

I'm working on a model first EF6 model in model first approach. EF exposes more than DBGeometry and DBGeography and allows me to select specific subtypes when designing the model (like GeographyPo...

1

Like several others I have tried to implement ASP.NET Identity Model First. Everything works fine once you have tried, errored, fumed, searched and resolved.. I thought. See also: ASP.NET Ident...

5

EF has generated for me some partial classes, each with a constructor, but it says not to touch them (example below), now if I make my own secondary partial class and I want to have a constructor t...

1

Solved

EDIT I've done some testing and found out, that the Item navigation property only works when the context is disposed/a new context is created. DataContext context = new DataContext(); Order ord...

2

Solved

Code first migrations have been working very well for me. I have a services project and a wpf project. The model is in the services project which is referenced by the wpf project. Update-database i...

1

Solved

Desired outcome: Use model first approach with Entity Framework and allow changes to deployed database/ model to be done automatically based on the changes in the model. Automatic schema differen...
Puerile asked 27/1, 2014 at 23:5

2

I am developing Entity Framework based app. I am using model-first approach. I would like to handle the concurrency issues. As written in many articles I am going to do it by turning the Concurrenc...
Azotic asked 6/3, 2012 at 9:27

3

Is there an alternative to using Include to eager load entities? The reason I can't use Include is that it appears to be case sensitive. Consider the following example: I have two tables: Not...
Coltish asked 19/11, 2013 at 9:59

4

Solved

I have some models and tables in EF that you can see one of those here: Now when I want to generate database from model it adds 's' to name of tables in generated sql: CREATE TABLE [dbo].[Optio...

2

Solved

I have setup a system where I have taken the model first approach as it made more logical sense for me. Now when even I have some changes in the model currently what I do is - Use the Generate d...

1

This is a MODEL first approach. I have already researched this extensiely and have not come up with an answer. I have tried all the suggestions at the following links: This appears to be the same ...

© 2022 - 2024 — McMap. All rights reserved.