Value cannot be null: connection while testing database

后端 未结 1 1373
执笔经年
执笔经年 2021-01-17 22:12

I\'m trying to run integration tests for my ASP.NET MVC application using Entity Framework 6.

The error I get is

System.Data.Entity.Core.Enti

相关标签:
1条回答
  • 2021-01-17 22:40

    You're calling Commit and then Rollback, but the comments point that mistake out.

    The error isn't very intuitive, I mean, an ArgumentNullException should never work its way out of an SDK from down the stack.

    But I've had this when I've accidentally reused the same transaction instance, or called Commit twice, or tried to rollback twice in layered error recovery logic.

    0 讨论(0)
提交回复
热议问题