Db Transactions | Copy Exercise | Aufgabe kopieren

[Ist eigentlich ein Backend-Issue]

Es tritt u.U. ein Fehler auf, wenn _context.Database.BeginTransaction() ausgeführt wird und andere Nutzer ebenfalls eine Transaktion beginnen wollen (siehe https://www.npgsql.org/doc/transactions.html).

Aktuell (2019.11.01) sind das an aktuellen Stellen/Funktionen

  • EditCustomProjectController.cs
    • CreateCustomProject
    • ChangeCustomProjectSolution
  • DoExerciseAfterSolutionController.cs
    • CreateOrUpdateAfterSolution
  • DoExerciseController.cs
    • _CreateInitialSolution
    • SaveCodeFiles
  • ExerciseEditorController.cs
    • CreateFullExercise
    • ChangeFullExercise
    • CreateExerciseCopy

Allerdings funktioniert ExerciseEditorController.cs > ChangeFullExercise fast immer, dagegen ExerciseEditorController.cs > CreateExerciseCopy fast nie (wenn andere Nutzer online sind)...

Vielleicht hat es was mit den benutzten Tabellen zu tun ?

Vielleicht hier mal gucken https://coderwall.com/p/jnniww/why-you-shouldn-t-use-entity-framework-with-transactions (ist aber für neuere Version)

Edited by Ghost User