Readdy Write  
0,00 €
Your View Money
Views: Count
Self 20% 0
Your Content 60% 0

Users by Links 0
u1*(Content+Views) 10% 0
Follow-Follower 0
s2*(Income) 5% 0

Count
Followers 0
Login Register as User

🎬 Solved: fail: Failed executing DbCommand ..UPDATE ..while saving changes

10.05.2018 (👁12088)

Video: 

 

The following code example shows how to solve the error Failed executing DbCommand Update in Asp.Net Core and EF Entity Framework.

 

Task: my Asp.Net Core 2 MVC application hangs up regularly when a record is to be written.

This is a simple counter that increases website access.

 

The error message in the log file of the Asp Core application is:

fail: Microsoft.EntityFrameworkCore.Database.Command[20102]

 Failed executing DbCommand (45ms) [Parameters=[@p1='?', @p0='?'], CommandType='Text', CommandTimeout='30']

..      UPDATE [tbl_Notes] SET ..

System.Data.SqlClient.SqlException (0x80131904): Timeout expired. 

 

And this comes the error:

fail: Microsoft.EntityFrameworkCore.Update[10000]

      An exception occurred in the database while saving changes for context type

 

 

Log file of asp application