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

Very strange problem ClientContext data loss #2262

Open
angtianqiang opened this issue Nov 30, 2019 · 1 comment

Comments

@angtianqiang
Copy link

@angtianqiang angtianqiang commented Nov 30, 2019

I tested a very strange question

I tested a very strange question
Running environment: WPF netcore3.0 csla5.0.1
Problem description: set the ClientContext value in the WPF start window and read it as null, while it can be read normally in the non-wpf main window. This problem has not occurred before with WPF (net4.0)+csla4.7.2, can you help to see what is going on

Test code:

public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
Csla.ApplicationContext.ClientContext["a"] = "test";
}

    private void Button_Click(object sender, RoutedEventArgs e)
    {
        var aa = Csla.ApplicationContext.ClientContext["a"];
        //   aa = null;
        //This is in the main window and reads null
    }

   
}

public partial class Window1 : Window
{
public Window1()
{
InitializeComponent();
Csla.ApplicationContext.ClientContext["b"] = "test";
}

    private void Button_Click(object sender, RoutedEventArgs e)
    {
        var bb = Csla.ApplicationContext.ClientContext["b"];
        //  bb = test"
        //This is the non-wpf main window and can be read normally
    }
}
@arpitmathur

This comment has been minimized.

Copy link
Contributor

@arpitmathur arpitmathur commented Dec 3, 2019

@angtianqiang Why do you believe this is a WPF issue and not a Csla issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.