blazor

Blazor concurrency problem using Entity Framework Core

家住魔仙堡 提交于 2020-05-11 11:06:28
问题 My goal I want to create a new IdentityUser and show all the users already created through the same Blazor page. This page has: a form through you will create an IdentityUser a third-party's grid component (DevExpress Blazor DxDataGrid) that shows all users using UserManager.Users property. This component accepts an IQueryable as a data source. Problem When I create a new user through the form (1) I will get the following concurrency error: InvalidOperationException: A second operation

Blazor concurrency problem using Entity Framework Core

妖精的绣舞 提交于 2020-05-11 11:02:19
问题 My goal I want to create a new IdentityUser and show all the users already created through the same Blazor page. This page has: a form through you will create an IdentityUser a third-party's grid component (DevExpress Blazor DxDataGrid) that shows all users using UserManager.Users property. This component accepts an IQueryable as a data source. Problem When I create a new user through the form (1) I will get the following concurrency error: InvalidOperationException: A second operation

How to implement drag and drop in Blazor?

旧巷老猫 提交于 2020-05-10 14:17:07
问题 I know Blazor is a new technology. Its current release states v0.5.1 However I'm currently implementing a PoC for a new web application. We'd like to have the feature drag&drop in the app. I tried to implement it the Blazor way but it does not work. My droptarget: <div class="col" ondragstart="@AllowDragOver" ondrop="@Add"> And the draggable item: <span class="badge badge-warning" draggable="true">îtem 1</span> The Blazor C# code: @functions { void Add() { Items.Add("hello"); } void

How to implement drag and drop in Blazor?

流过昼夜 提交于 2020-05-10 14:16:49
问题 I know Blazor is a new technology. Its current release states v0.5.1 However I'm currently implementing a PoC for a new web application. We'd like to have the feature drag&drop in the app. I tried to implement it the Blazor way but it does not work. My droptarget: <div class="col" ondragstart="@AllowDragOver" ondrop="@Add"> And the draggable item: <span class="badge badge-warning" draggable="true">îtem 1</span> The Blazor C# code: @functions { void Add() { Items.Add("hello"); } void

How to implement drag and drop in Blazor?

瘦欲@ 提交于 2020-05-10 14:14:08
问题 I know Blazor is a new technology. Its current release states v0.5.1 However I'm currently implementing a PoC for a new web application. We'd like to have the feature drag&drop in the app. I tried to implement it the Blazor way but it does not work. My droptarget: <div class="col" ondragstart="@AllowDragOver" ondrop="@Add"> And the draggable item: <span class="badge badge-warning" draggable="true">îtem 1</span> The Blazor C# code: @functions { void Add() { Items.Add("hello"); } void

Blazor 'Global' Parameter - passing between MainLayout.razor , NavMenu.razor, Counter.razor - back and forth

。_饼干妹妹 提交于 2020-05-09 06:47:12
问题 Given a 'default' Blazor app - created using the Visual Studio 2019 Blazor server template . How do you create a GLOBAL object that is accessible from all the razor pages and components. How would you make the 'Current Count ' value - visible and 'dynamically' updated on the MainLayout, NavMenu, Index pages? Current count: @currentCount Use [Parameters] ? Use [CascadingParameter] ? Create a Static Class ? What is the recommended approach in Blazor? 回答1: One way to do this is to is to use a

Blazor (Server Side) and Okta

倖福魔咒の 提交于 2020-05-09 06:09:39
问题 I am currently going through this post to integrate okta into a Blazor Server Side App https://developer.okta.com/blog/2019/10/16/csharp-blazor-authentication I am currently getting “Sorry, there's nothing at this address”. I was hoping someone could provide a suggestion to my problem. Or does anyone know of an example to integrate okta into a Blazor Server Side App? Please let me know. Any help would be appreciated. I am totally spinning my wheels. Here are my okta General Settings: Below is

How can I get the event while page close in blazor server-side?

我的未来我决定 提交于 2020-05-08 12:50:06
问题 I am making a chatroom App by the blazor server-side. I want to show the online state of each user. Now I can use the OnAfterRenderAsync event to get a user has entered the page. It seems there is not any exit event in blazor lifecycle via https://docs.microsoft.com/en-us/aspnet/core/blazor/lifecycle?view=aspnetcore-3.1 Someone said I can use the Dispose event to achieve it while it does work at all. What's more, I have a crazy idea that using the window.onbeforeunload event of js to invoke

How can I get the event while page close in blazor server-side?

夙愿已清 提交于 2020-05-08 12:49:28
问题 I am making a chatroom App by the blazor server-side. I want to show the online state of each user. Now I can use the OnAfterRenderAsync event to get a user has entered the page. It seems there is not any exit event in blazor lifecycle via https://docs.microsoft.com/en-us/aspnet/core/blazor/lifecycle?view=aspnetcore-3.1 Someone said I can use the Dispose event to achieve it while it does work at all. What's more, I have a crazy idea that using the window.onbeforeunload event of js to invoke

How can I get the event while page close in blazor server-side?

|▌冷眼眸甩不掉的悲伤 提交于 2020-05-08 12:49:27
问题 I am making a chatroom App by the blazor server-side. I want to show the online state of each user. Now I can use the OnAfterRenderAsync event to get a user has entered the page. It seems there is not any exit event in blazor lifecycle via https://docs.microsoft.com/en-us/aspnet/core/blazor/lifecycle?view=aspnetcore-3.1 Someone said I can use the Dispose event to achieve it while it does work at all. What's more, I have a crazy idea that using the window.onbeforeunload event of js to invoke