I'm using dotConnect for Oracle 7.4.142 and EntityFramework Code First (Runtime 4.5).
In a solution I'm reading xml files from a directory and update an Oracle's table.
This is a simply code:
Code: Select all
MyDbContext ctx = new MyDbContext();
foreach (var item in Directory.GetFiles(@"mydir", "*.xml")
{
Customer c = new Customer();
// Loading data into c variable from xml file
ctx.Customers.Add(c);
using (TransactionScope t = new TransactionScope())
{
ctx.SaveChanges();
t.Complete();
}
}
When I have a lot of files to elaborate in a same execution, the programm exit with "ORA-8177" error.
It seems a problem of the IsolationLevel used.
How can I change it?
PS: On MyDbContext I make some configurations by code...
Code: Select all
OracleEntityProviderConfig.Instance.CodeFirstOptions.UseNonUnicodeStrings = true;
OracleEntityProviderConfig.Instance.Workarounds.IgnoreSchemaName = true;
OracleEntityProviderConfig.Instance.Workarounds.IgnoreDboSchemaName = true;
OracleEntityProviderConfig.Instance.CodeFirstOptions.TruncateLongDefaultNames = true;
OracleEntityProviderConfig.Instance.CodeFirstOptions.UseDateTimeAsDate = true;
OracleEntityProviderConfig.Instance.Workarounds.DisableQuoting = true;
OracleEntityProviderConfig.Instance.Workarounds.ColumnTypeCasingConventionCompatibility = true;