[DevExpress Support Team: CLONED FROM T419520: How to troubleshoot the "Reentrancy or cross thread operation detected" error]
HelloDevExpress,
switch from
string connectionString = "Server=tcp:…,1433;Initial Catalog…";
dataLayer = XpoDefault.GetDataLayer(defaultConnectionString, AutoCreateOption.DatabaseAndSchema);
to TheadSafeDataLayer described here: https://docs.devexpress.com/XPO/DevExpress.Xpo.ThreadSafeDataLayer
What about the ConnectionHelper.cs files generated using XPO wizard.
They still have code like
public const string ConnectionString = @"Server=tcp:…,1433;Initial Catalog…";
public static void Connect(DevExpress.Xpo.DB.AutoCreateOption autoCreateOption, bool threadSafe = false)
Regards. Walter.