打开 关闭

Warning message after Migrations are done #4286


User avatar
0

Hello everyone. While my project's migration this warning appears;

-[WRN] Savepoints are disabled because Multiple Active Result Sets (MARS) is enabled. If 'SaveChanges' fails, then the transaction cannot be automatically rolled back to a known clean state. Instead, the transaction should be rolled back by the application before retrying 'SaveChanges'. See https://go.microsoft.com/fwlink/?linkid=2149338 for more information. To identify the code which triggers this warning, call 'ConfigureWarnings(w => w.Throw(SqlServerEventId.SavepointsDisabledBecauseOfMARS))'.

İf I add my connection string to this parametre:"MultipleActiveResultSets=true" this warning shows itselfs.

1-What are the side effects of this warning ? Will block my next migrations ? 2-Should I use this parametre?(MultipleActiveResultSets=true)

  • ABP Framework version: v6.0.2
  • UI type: Angular
  • DB provider: EF Core

1 答案
  • User Avatar
    0
    maliming 创建
    支持团队 Fullstack Developer

    hi

    Savepoints are incompatible with SQL Server's Multiple Active Result Sets(MultipleActiveResultSets), and are not used. If an error occurs during SaveChanges, the transaction may be left in an unknown state.

    https://learn.microsoft.com/en-us/ef/core/saving/transactions#savepoints

Made with ❤️ on ABP v8.2.0-preview Updated on 三月 25, 2024, 15:11