Top "Ef-code-first" questions

EF Code-First is a way of using Microsoft's Entity Framework with POCO classes, as opposed to model-first or DB-first.

Many-to-many mapping table

From examples that I have seen online and in a Programming Entity Framework CodeFirst book, when you have a collection …

c# entity-framework ef-code-first many-to-many
Entity framework, problems updating related objects

I am currently working on a project using the latest version of Entity Framework and I have come across an …

c# entity-framework ef-code-first
Mapping a foreign key with a custom column name

I'm using Entity Framework 4.3 code-first with Oracle. I'm getting the following error: System.InvalidOperationException : The ForeignKeyAttribute on property 'WidgetSequence' on …

c# oracle ef-code-first entity-framework-4.3
Entity Framework creates a plural table name, but the view expects a singular table name?

I am using MySQL .net connector 6.4.4.0 and Entity Frame work 4.1 and trying to create the most basic of code-first implementations. …

c# mysql entity-framework-4 ef-code-first asp.net-mvc-4
How to create a view using EF code-first POCO

That simple. I need to create a View using Code First. I found nothing about this on google nor SO. …

c# linq entity-framework ef-code-first
Entity Framework Code First : how to annotate a foreign key for a "Default" value?

I have 2 classes: Client and Survey. Each Client can have many surveys - but only one default survey. I have …

entity-framework ef-code-first data-annotations
Entity Framework 6 with SQLite 3 Code First - Won't create tables

Using latest versions of EF6 and SQLite from NuGet. I finally got the app.config file to work after some …

.net sqlite ef-code-first entity-framework-6 system.data.sqlite
Entity Framework Code First Fluent Api: Adding Indexes to columns

I'm running EF 4.2 CF and want to create indexes on certain columns in my POCO objects. As an example lets …

c# entity-framework-4 ef-code-first data-annotations fluent-interface
Entity Framework query slow, but same SQL in SqlQuery is fast

I'm seeing some really strange perf related to a very simple query using Entity Framework Code-First with .NET framework version 4. …

performance entity-framework ef-code-first