@implements IDisposable;
@inject IEntityDialogService entityDialogService
@{
var entity = DATA.Get()[entityDialogService.GetEntityId()];
}
@if (entity == null)
{
Entity is null
}
else
{
}
@code {
protected override void OnInitialized()
{
entityDialogService.Subscribe(OnUpdate);
}
public void Dispose() {
entityDialogService.Unsubscribe(OnUpdate);
}
void OnUpdate()
{
StateHasChanged();
}
public void CloseDialog()
{
entityDialogService.CloseDialog();
}
}