Table trigger causing DbUpdateException
When saving an object to a table with a defined trigger I'm getting DbUpdateException:
An exception of type 'Microsoft.Data.Entity.DbUpdateException' occurred in EntityFramework.Core.dll
"The target table 'XYZ' of the DML statement cannot have any enabled triggers if the statement contains an OUTPUT clause without INTO clause"
This is the generated command text: exec sp_executesql N'SET NOCOUNT OFF; INSERT INTO 'XYZ' ([Code], [Name]) OUTPUT INSERTED.[XYZ_Key], INSERTED.[RowVersion] VALUES (@p0, @p1); ',N'@p0 nvarchar(4000),@p1 nvarchar(4000)',@p0=N'tests',@p1=N'testt'
This is a dupe of https://github.com/aspnet/EntityFramework/issues/1441 and a fix has already been committed that will ship in RC2.