zzz projects Entity Framework 6 EF 6
Home EF Core Articles Knowledge Base Online Examples
  • Home
  • EF Core
  • Articles
  • Knowledge Base
  • Online Examples

Entity Framework 6 - Knowledge Base (KB)

12 results in tag: primary-key

The Update Wizard in ADO.NET Entity Framework does not add tables.

I ...added a new ADO.Net Entity Data Model... into my project and used the ...Update Wizard... to add tables into the model. Five of the selected tables were added to the design surface. Two other tables will not add. I select them in the wizard and cl...
.net ado.net entity-framework primary-key visual-studio-2008
asked by Robert Claypool

View of Entity Framework and SQL Server

For several reasons that I don't have the liberty to talk about, we are defining a view on our Sql Server 2005 database like so:...CREATE VIEW [dbo].[MeterProvingStatisticsPoint] AS SELECT CAST(0 AS BIGINT) AS 'RowNumber', CAST(0 AS BIGINT) AS 'Pr...
.net-3.5 entity-framework primary-key sql-server-2005 sql-view
asked by Sergio Romero

Primary keys in Entity Framework Views

I have to use a View with the EF but, when I import it, the primary key of the view is displayed incorrectly and for some reason I can't change it.
.net entity-framework primary-key sql-view
asked by Diego

Entity Framework 4.0 composite database keys

The re-design for a large database at our company makes extensive use of composite primary keys on the database....Forgetting performance impacts, will this cause any difficulties when working with this db in Entity Framework 4.0? The database structure i...
composite-key entity-framework primary-key
asked by Steve Ward

Entity Framework Add Item with Many-to-Many Relationship

I am getting a primary key violation error when I attempt to add an item with a many-to-many relationship:...I have two classes - Articles and Tags which have a many-to-many relationship : ...public class Article { public int ID { get; set; } publ...
.net c# entity-framework exception primary-key
asked by Judo

Because it contains a DefiningQuery and no UpdateFunction> element, the EntitySet cannot be updated.

I am using Entity Framework 1 with .net 3.5....I am doing something simple like this:...var roomDetails = context.Rooms.ToList(); foreach (var room in roomDetails) { room.LastUpdated = DateTime.Now; } ...I am getting this error when I try to d...
.net asp.net c# entity-framework primary-key
asked by iKode

What are the best practices for using a GUID as a primary key, specifically regarding performance?

I have an application that uses GUID as the Primary Key in almost all tables and I have read that there are issues about performance when using GUID as Primary Key. Honestly, I haven't seen any problem, but I'm about to start a new application and I still...
database-design entity-framework guid primary-key sql-server
asked by VAAA

How To Set a Primary Key On a View Using ROW_NUMBER()?

I use SQL Server 2008 and Entity Framework for an app I work on. ...I've set primary keys on all tables in SQL Server, since EF requires it, but I have a problem with one view. Since it doesn't have primary key, I've used ROW_NUMBER() function to get uniq...
entity-framework primary-key sql-server-2008
asked by Ana M

Save detached object graph using Entity Framework code first causes Primary Key violation

I'm trying to save an object graph of POCOs I have mapped to EF6 using Code First fluent notations....Upon saving the object graph however, I stumble upon primary key violation exceptions....The object graph is quite simple:...One ...Issue... can contain ...
c# ef-code-first entity-framework entity-framework-6 primary-key
asked by Robert Sirre

How to manually set entity primary key in Entity Framework code first database?

Well, I have the following model structure: I have one class - ...DatabaseEntity... which is basically ...public class DatabaseEntity { public int Id { get; set; } } ...so each entity like product, category etc will inherit ...DatabaseEntity... and ha...
c# entity-framework primary-key
asked by Dmytro

Attaching an entity of type failed because another entity of the same type already has the same primary key value.

Let me quickly describe my problem....I have ...5 databases... for 5 customers and ...each has the same table called SubnetSettings.... ...I already created a dropdownlist to select a customer and will shows up the SubnetSetting table which belong to sele...
c# entity-framework model-view-controller primary-key
asked by user3618052

Should I use an int or a long for the primary key in an entity framework model

I am writing an MVC5 Internet application and I have a question about the id field for a model....Should I use an int or a long for the id in a model? I am talking about the field that is used for the primary key? Is an int enough if the database has 100,...
c# entity-framework-6 int model primary-key
asked by user3736648

Page 1 of 1
  • 1

Prime Library

Performance

  • Entity Framework Extensions
  • Entity Framework Classic
  • Bulk Operations
  • Dapper Plus

Expression Evaluator

  • C# Eval Expression
  • SQL Eval Function
More Projects...

Related

  • EF Extensions Online Benchmark
  • WIN an EF Extensions license
  • EF6 BatchSaveChanges for only $79
Save your entities 20× faster with EF Extensions
SaveChanges vs BulkSaveChanges

EF Extensions
Try for free now
Get monthly updates by subscribing to our newsletter!
SUBSCRIBE!