question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error on context.SaveChanges()

See original GitHub issue

Hello, I’m stuck on this error trying to save my entity with the library:

em System.Linq.Enumerable.Single[TSource](IEnumerable1 source, Func2 predicate) em EntityKeyHelper.GetMapping(Type type, DbContext context) em EntityKeyHelper.GetColumnName(Type type, String propertyName, DbContext context) em Audit.EntityFramework.DbContextHelper.GetChanges(DbContext dbContext, DbEntityEntry entry) em Audit.EntityFramework.DbContextHelper.CreateAuditEvent(IAuditDbContext context) em Audit.EntityFramework.DbContextHelper.SaveChanges(IAuditDbContext context, Func1 baseSaveChanges) em Audit.EntityFramework.AuditIdentityDbContext1.SaveChanges() em Stock.Data.Repositories.TransacaoRepository.ResolveTransaction(Boolean updateAveragePrice, Transacao[] transactions) na C:\Projetos\palm-stock\Palm.Stock\Stock.Data\Repositories\TransacaoRepository.cs:linha 99

Thanks in advance for this wonderful job on auditing items, it’s a time saver for us debuggin’ things 😉

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
thepirat000commented, Jul 22, 2017

Hi, thanks for your comments.

Unfortunately with the information provided I cannot tell what could be happening.

Are you using any kind of inheritance on your model/entity classes? Does this happens when you modify a particular entity type, or any? Can you provide a minimal test code including the model classes having problems?

0reactions
lincolnqjuniorcommented, Aug 4, 2017

Sorry, I missed the time to do it because of other project.

You can close, but I’ll let you know when change back to track

Em sex, 4 de ago de 2017 às 18:09, Federico Daniel Colombo < notifications@github.com> escreveu:

Any update on this or can I close this issue?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/thepirat000/Audit.NET/issues/55#issuecomment-320353926, or mute the thread https://github.com/notifications/unsubscribe-auth/AAbMCdUMSSUeXH1igtEdAkuLDoC-6Gmcks5sU4ikgaJpZM4Of8k0 .

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - context.SaveChanges() gives error upon Adding
How should I find the reason for this error and fix it? I am using this code to see the inner exception: context.Slabs.Add(newslab);...
Read more >
What to do when SaveChanges() fails?
Trap the exception caused by the failed call to SaveChanges(). Find out all the errors that occurred during the SaveChanges() call. Find out ......
Read more >
Getting following error on context.SaveChanges(): #2105
I have created entity framework application with a table user_details and its partioning table. This is UserContext class: class UserContext: ...
Read more >
Entity Framework Error on SaveChanges()
an exception occurred on the line DBEntities.SaveChanges() and it says the following: Issue: Unable to update the EntitySet - because it has a ......
Read more >
EF: When SaveChanges does not save changes
I was debugging an issue with DbContext.SaveChanges which was neither saving changes to the database... Tagged with csharp, dotnet.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found