I am trying to save some stuff to cmstags table using npoco from Umbraco.
My code looks like this:
using (var scope = _scopeProvider.CreateScope(autoComplete: true))
{
using (var transaction = scope.Database.GetTransaction())
{
scope.Database.InsertBulk(newTags);
transaction.Complete();
}
}
I get the following exception:
System.InvalidCastException: Unable to cast object of type 'Umbraco.Core.Persistence.FaultHandling.RetryDbConnection' to type 'System.Data.SqlClient.SqlConnection'
Before the insert I do a read and that works fine. Just does not want to save.
NPoco in v8 save issue
I am trying to save some stuff to cmstags table using npoco from Umbraco.
My code looks like this:
I get the following exception:
Before the insert I do a read and that works fine. Just does not want to save.
Anyone seen this before?
Ok so fixed this,
is working on a reply...