Questions tagged [ef-model-first]
231 questions
4
votes
2 answers
Encrypt password field with Entity Framework Model First
I'm using Entity Framework Model First in my project with VS2010.
I'm wondering if there is a way to set the field password to be encrypted in .edmx window or Properties windows maybe. I don't want to change the generated .cs file since it will be…

Ovilia
- 7,066
- 12
- 47
- 70
3
votes
1 answer
Entity Framework Model First Navigation Properties adding invalid column names to query?
In our database, we have the following tables
Tags
Id (int)
Name (string)
IsActive (bool)
TagType (string)
and
DocumentStyles
Id (int)
Name (string)
StyleRules (string)
IsAvailable (bool)
ThumbnailFileId (int nullable)
…

Thomas Jones
- 4,892
- 26
- 34
3
votes
2 answers
EF Model First with Stored Procedures
I'm using EF 4 with model-first...I generate the database from the model.
How would I be able to use stored-procedures in that scenario? They should also be auto-generated with the database..?

SolarX
- 1,873
- 2
- 18
- 26
3
votes
2 answers
Generate DB - no execute SQL option?
I have been trying to follow the few tutorials on how to create a DB using the model first approach in MVC. I have gone as far as creating Entities in the designer and trying to generate a DB from the model. It creates SQL file fine but I cant seem…

davey
- 1,544
- 4
- 26
- 41
3
votes
1 answer
General Entity Framework confusion
So I've run into something and was wondering if you could help me out. I am very new (this is my first project in these languages) to MS MVC 2 and Entity Framework 4.0. I've drawn up a model using the Model First approach and the graphical…

SenseiHitokiri
- 489
- 1
- 6
- 22
3
votes
2 answers
how can I add table prefixes to tables created using model first in EF4?
My client has a db table naming convention that requires me to prefix all tables with an application specific prefix - like "myapp_" - I am using EF4 with the model first approach.
I can specify a custom db namespace but they do not want to…

MIantosca
- 833
- 1
- 10
- 33
3
votes
2 answers
Code Generation - Domain/model first (DDD)
I'm looking for a 'complete' solution for code-generation based on DDD or model first approach. Ideally, this would be a separate application or VS plugin that we could use and re-use to generate as much of the standard plumbing code as possible,…

Rob
- 515
- 1
- 7
- 18
3
votes
1 answer
ASP.NET MVC 5 Identity with Model First
I'm developing a web application and I would like to implement Identity. I've done a couple of tests and it's pretty easy to implement when using a Code First approach.
My issue is that I can't get it to work with a Model First approach. I would…

MxFragz
- 198
- 3
- 14
3
votes
1 answer
Entity Framework - Reference not loading
I have a model-first, entity framework design like this (version 4.4)
When I load it using code like this:
PriceSnapshotSummary snapshot = db.PriceSnapshotSummaries.FirstOrDefault(pss => pss.Id == snapshotId);
the snapshot has loaded everything…

Jarek Mitek
- 598
- 6
- 16
3
votes
1 answer
DataBinding DataGridView to EF.DbSet, how to send new DataGridView rows to DbSet?
I want to databind my DataGridView control to database through Entity model (created with model first approach), i am using EF 5.0, .NET 4.5 and winforms
My binding is organized as…

Prokurors
- 2,458
- 3
- 40
- 65
3
votes
1 answer
Upgrading EF in pregenerated views: The default target Entity Framework version requires the edmx schema version 2 or lower
I have pre-generated views following the templates of the next link:
http://blogs.msdn.com/b/adonet/archive/2008/06/20/how-to-use-a-t4-template-for-view-generation.aspx
I need to improve to Entity Framework 5.0 but if I replace the schemas as…

The Beat
- 150
- 9
3
votes
2 answers
What to use with a half-designed database? Model-First or Database-First?
Let's say you have a database that is currently in use. It has one table that contains some information about Customers.
And let's say that you want to create an application around it. You need to use the Customers table in your program, but you…

hattenn
- 4,371
- 9
- 41
- 80
3
votes
1 answer
Add documentation to generated code in entity framework model first
I have been using Entity Framework model first since VS 2010. When I build my project, EF generates a Model.Designer.cs file containing all entities. This designer file also contains the documentation added to the entities in the EDMX file.
When I…

Chris
- 6,914
- 5
- 54
- 80
3
votes
1 answer
Code First code generation trying to create the model?
Moving to Entity Framework 5, model first (due to the database being complex and being maintained separately). Importing the database, using the new DbContext code generator.
protected override void OnModelCreating(DbModelBuilder modelBuilder)
…

TomTom
- 61,059
- 10
- 88
- 148
3
votes
1 answer
How update database schema from EF5.0 model first changes?
I'm using VS2012 and EF 5.0 with a model first approach. I am wondering if there is any good way to generate incremental DDL to update model changes without dropping all the tables and losing the data I have in there already.

Dave
- 1,822
- 2
- 27
- 36