Код: Выделить всё
var rowsAffected = session.CreateSQLQuery($@"UPDATE [bt].[Notification] SET Status = 1 Where Status = 1;").ExecuteUpdate();
Код: Выделить всё
NHibernate.Exceptions.GenericADOException
HResult=0x80131600
Message=could not execute native bulk manipulation query:UPDATE [bt].[Notification] SET Status = 1 Where Status = 1;[SQL: UPDATE [bt].[Notification] SET Status = 1 Where Status = 1;]
Source=NHibernate
StackTrace:
at NHibernate.Engine.Query.NativeSQLQueryPlan.PerformExecuteUpdate(QueryParameters queryParameters, ISessionImplementor session)
at NHibernate.Impl.SessionImpl.ExecuteNativeUpdate(NativeSQLQuerySpecification nativeQuerySpecification, QueryParameters queryParameters)
at NHibernate.Impl.SqlQueryImpl.ExecuteUpdate()
at xxxxxxxxxx.NotificationSender.MainThread() in C:\git\xxxxxxx\NotificationSender.cs:line 44
Inner Exception 1:
SqlException: Invalid object name 'bt.Notification'.
Подробнее здесь: https://stackoverflow.com/questions/790 ... le-name-is