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)

20 results in tag: exception

Entity Framework and Autonumber

I want to loop through a collection of objects and add them all to a table. The destination table has an auto-increment field. If I add a single object there is no problem. If I add two objects both with the primary key of zero, the entity framework fa...
auto-increment c# entity-framework exception
asked by dcompiled

Exception code -532462766 complus

Using visual studio 2010, entity framework 4.0, ADO.NET POCO Entity Generator...On the code lines:...MecDbEnt.Domains.AddObject(subject);...MecDbEnt.SaveChanges(); (on this line)...the application throws follow exception:...complus exception code -53246...
c#-4.0 entity-framework exception visual-studio
asked by Masna

Entity Framework duplicate key exception?

I'm trying to catch the exception thrown when I insert a already existing user with the given username into my database. As the title says then I'm using EF. The only exception that's thrown when I try to insert the user into to db is a "UpdateException" ...
c# entity-framework exception
asked by ebb

When I attempt to edit a model in Entity Framework, I receive a "Unable to update the EntitySet since it includes a DefiningQuery..." error.

While updating with the help of LINQ to SQL using Entity Framework, an exception is thrown....System.Data.UpdateException: Unable to update the EntitySet 't_emp' because it has a DefiningQuery and no <UpdateFunction> element exists in the <Modificatio...
asp.net-mvc entity-framework exception linq-to-sql
asked by Thomas Mathew

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

When utilizing Entity Framework with Oracle, an operation is not acceptable owing to the present state of the object.

I'm attempting to add a new Entity object for persistence, however I'm getting an ...UpdateException... who's inner exception is an ...InvalidOperationException... with the message:...Operation is not valid due to the current state of the object....Object...
c# entity-framework exception oracle oracle11g
asked by m.edmondson

In Entity Framework and the repository pattern, where should DB exceptions be handled?

how would you design this scenario (using Entity Framework 4.1, Code First and repository pattern): the Visual Studio solution contains the following projects...Solution |-Web Application Project |-DAL Project |-Model Project ...So in the Model Project th...
entity-framework error-handling exception repository
asked by Savvas Sopiadis

The specified store provider cannot be found in the configuration, or is not valid

i use entity framwork with SQL Server CE 3.5 and i have this error ...The specified store provider cannot be found in the configuration, or is not valid....<Schema Namespace="OimDBModel.Store" Alias="Self" Provider="System.Data.SqlServerCe.3.5" ProviderMa...
entity-framework exception sql-server-ce syntax-error
asked by Tarek Saied

EntityFramework Exception : New transaction is not allowed because there are other threads running in the session

I am using ServiceBrokerClass which i got from ...CodeProject.... But now when i try to save any record into database using EnityFramework and .Net WPF. I am getting the following error....ServiceBrokerUtility Class :...using System; using System.Collecti...
c# entity-framework exception sql-server wpf
asked by Kishore Kumar

EF Exception: String or binary data would be truncated. The statement has been terminated.?

I have read many posts related to this issue, but couldn't find an answer. I am trying to load a large amount of data from Excel into SQL Server. Thousands of records. And I am getting this exception:...String or binary data would be truncated. The statem...
c# entity-framework exception sql-server
asked by monstro

A first chance exception of type 'System.InvalidOperationException' occurred in PresentationFramework.dll

All,...I'm using DataBase First Entity Framework v4.4. In the DB (and data model) is Table1 that has a 1:many relationship to Table2....I am binding a DataGrid in WPF to Table1.Local.First().Table2 (for simplicity, assume that there is an entity in Table...
entity-framework exception invalidoperationexception wpf
asked by William

EntityFramework,The specified store provider cannot be found in the configuration, or is not valid

I have a Winform application and am using EntityFramework. The application runs just fine in my dev machine but when I try to run at client's machine I get "The specified store provider cannot be found in the configuration, or is not valid" error. I have ...
c# entity-framework exception
asked by jeff

The provider for invariant name System.Data.SqlClient is specified multiple times

I've update Entity Framework to 6.0 and now I'm getting an exception that I can't figure out....An error occurred creating the configuration section handler for entityFramework: The provider for invariant name 'System.Data.SqlClient' is specified multiple...
c# entity-framework exception
asked by bflemi3

Exception when loading related objects. Entity Framework

I am getting an exception when loading related objects in my db. I am loading all my ...MatchData... objects and I want to iterate them with a foreach....The objects that I'm loading is:...MatchData Class:...public class MatchData { [Key] public v...
c# entity-framework exception
asked by Mads Gadeberg

Is this a bug in JSON.NET or Entity Framework or am I doing something wrong while trying to serialize a list of Exceptions with JSON.NET?

Got this error when trying to serialize a set of errors:..."ISerializable type 'System.Data.Entity.Infrastructure.DbUpdateConcurrencyException' does not have a valid constructor. To correctly implement ISerializable a constructor that takes SerializationI...
entity-framework-6 exception json.net serialization
asked by Triynko

Exception of type 'System.InvalidOperationException' occurred in System.Core.dll but was not handled in user code

I get the below excption:...Exception of type 'System.InvalidOperationException' occurred in System.Core.dll but was not handled in user code...Additional information: The sequence does not contain Elements....at line...var kategoria = db.Kategorie.Includ...
asp.net c# entity-framework exception list
asked by Lukasz

DbUpdateException: Which field is causing "String or binary data would be truncated"

I am getting a ...DbUpdateException... with message ...String or binary data would be truncated...I understand that one of the fields in the entity won't fit the length of the column in the database. And that I could go down and check them manually....Wha...
c# entity-framework entity-framework-6 exception
asked by Doomsknight

Handling exceptions for each entity in context.saveChanges()

Is it possible to get the specific exception of failed save for each entity in a bundle?...The simple use of saveChanges() gives one exception for all the bandle ....This is my code with try-catch block.:... foreach (EntityBase ent in response.Entities) ...
ado.net c# entity-framework-6 exception
asked by user1012506

Entity Framework: one or more of the foreign-key properties is non-nullable

I have a very complex database model. My program computes some ...data+db entries... and ...modifies+generates new entries... to update+insert in the database....When I use database context to insert the entries, everything works. But when I try to save c...
c# entity-framework entity-framework-6 exception sql-server
asked by E. Williams

Can't execute Query in EF6.3

I have the following query:...var result = await _dbContext.ApplicationItems.ToListAsync(); ...At runtime I get an exception on that query line:...I don't know why this exception is happening....The class ApplicationItem looks like this:...public class Ap...
.net entity-framework-6 exception
asked by Luka

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!