اگر در زمان بروز رسانی با مشکل زیر مواجه شدیم:
The target table 'X' of the DML statement cannot have any enabled triggers if the statement contains an OUTPUT
می توانیم با کد زیر در زمان تعریف جدول در ef core مشکل را بر طریف کنیم
builder.Entity<Table>(entry =>
{
entry.ToTable("Table_name", tb => tb.HasTrigger("Trigger_name"));
});
رفرنس حل مشکل در اجرای کوئری خام:
sql - Cannot use UPDATE with OUTPUT clause when a trigger is on the table - Stack Overflow
رای
0
ارسال نظر
مرتب سازی:
اولین نفری باشید که نظر می دهید!