Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Runtime using member ThreadSafeDataLayer #1082

Open
Muhammet87446 opened this issue Dec 25, 2024 · 1 comment
Open

Runtime using member ThreadSafeDataLayer #1082

Muhammet87446 opened this issue Dec 25, 2024 · 1 comment
Labels

Comments

@Muhammet87446
Copy link

Muhammet87446 commented Dec 25, 2024

Hello Tolis,

I've just converted my XAF and Xpand Framework included project from .Net 4.8 to net6 and in thread safe Blazor Server application. My DevExpress version is 24.1.3 and all expand references is suitable for it.
I get the following error while model loading after user login.

Cannot modify Dictionary because ThreadSafeDataLayer uses it.

Is there any way to use Runtime Member created from model in Blazor ThreadSafe Mode?

Thanx for advices.

@apobekiaris
Copy link
Member

First there was no change in this area if u had a working solution b4 should work also now. The ThreadSafeDataLayer has code that does not allow such operation, however if you take the responsibility your self you may use. A safe way to use it is to create members at runtime and then restart the app. So you may subclass the ThreadSafeDatalyer and override the method that throws like

    public class XpandThreadSafeDataLayer : ThreadSafeDataLayer{

        public XpandThreadSafeDataLayer(XPDictionary xpDictionary, IDataStore dataStore) : base(xpDictionary, dataStore){
            
        }

        protected override void OnClassInfoChanged(object sender, ClassInfoEventArgs e){
        }
    }

@apobekiaris apobekiaris removed their assignment Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants