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)

5 results in tag: constraints

Entity Framework: How to properly handle exceptions that occur due to SQL constraints

I use Entity Framework to access my SQL data. I have some constraints in the database schema and I wonder how to handle exceptions that are caused by these constraints....As example, I get the following exception in a case where two users try to add an (a...
constraints entity-framework sql sql-server unique-constraint
asked by driAn

Unique Key constraints for multiple columns in Entity Framework

I'm using Entity Framework 5.0 Code First;...public class Entity { [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)] public string EntityId { get; set;} public int FirstColumn { get; set;} public int SecondColumn { get; set;} } ..
constraints ef-code-first entity-framework multiple-columns unique-key
asked by Bassam Alugili

Entity framework Code First One-to-One relationship

I have two entities which I want to be connected 1:1 relationship. User is principal and UserActivation is dependent, but I have no idea how that works....public class User { [Key] public Guid Id { get; set; } public string Name { get; set; } ...
c# constraints entity-framework key
asked by GrandaS

Entity Framework Primary/Foreign constraint name

Is there any way to rename a primary/foreign key constraint name through either data annotations or fluent API?...I'm not talking about the property/column name. The constraint name. I did some search and didn't find any solutions yet. ...Please help!
constraints ef-code-first ef-migrations entity-framework entity-framework-6
asked by renjith

DbUpdateException when adding item to Entity Framework Context

I have the following two classes:...public class Record { public int RecordId { get; set; } public DateTime? InsertDate { get; set; } = DateTime.Now; public DateTime BookingDate { get; set; } public string AmountTypeName { get; set; } ...
c# constraints entity-framework entity-framework-6
asked by ck84vi

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!