Hi, I have a mvc application that, for admin need, calls a stored procedure, imported in the ef 6 model, that calls internally the sql server backup stored procedure.
So far it was working fine but, i suppose after to update the ef Runtime to 6.0 rc1, when I call the stored procedure I receive the error that it's impossible to do a restore or backup procedure inside a transaction.
Inside the application I tried using both transactionScope, or setting the Transaction to null, but now I receive Always this error.
How can I solve this problem? I need to use this procedure without transactions, otherwise I have to call the sql directly via ado.net connection.
luca
So far it was working fine but, i suppose after to update the ef Runtime to 6.0 rc1, when I call the stored procedure I receive the error that it's impossible to do a restore or backup procedure inside a transaction.
Inside the application I tried using both transactionScope, or setting the Transaction to null, but now I receive Always this error.
How can I solve this problem? I need to use this procedure without transactions, otherwise I have to call the sql directly via ado.net connection.
using (TK_AdminEntities entities = new TK_AdminEntities())
{
using (TransactionScope ts = new TransactionScope(TransactionScopeOption.Suppress))
{
entities.Database.UseTransaction(null);
entities.SP_TK_BACKUPRG(1, progettoObj.Denominazione_Db, settings.PathBackup);
}
}
thanks, luca