Browse Source

Merge branch 'dev' of https://github.com/abpframework/abp into dev

pull/8964/head
Alper Ebicoglu 5 years ago
parent
commit
8a3b0b6dec
  1. 16
      framework/src/Volo.Abp.BlazoriseUI/AbpCrudPageBase.cs
  2. 15
      framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContextOptions.cs
  3. 5
      framework/src/Volo.Abp.ObjectExtending/Volo/Abp/ObjectExtending/ObjectExtensionInfo.cs

16
framework/src/Volo.Abp.BlazoriseUI/AbpCrudPageBase.cs

@ -485,16 +485,26 @@ namespace Volo.Abp.BlazoriseUI
try
{
await CheckDeletePolicyAsync();
await OnDeletingEntityAsync();
await AppService.DeleteAsync(entity.Id);
await GetEntitiesAsync();
await InvokeAsync(StateHasChanged);
await OnDeletedEntityAsync();
}
catch (Exception ex)
{
await HandleErrorAsync(ex);
}
}
protected virtual Task OnDeletingEntityAsync()
{
return Task.CompletedTask;
}
protected virtual async Task OnDeletedEntityAsync()
{
await GetEntitiesAsync();
await InvokeAsync(StateHasChanged);
}
protected virtual string GetDeleteConfirmationMessage(TListViewModel entity)
{

15
framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContextOptions.cs

@ -39,6 +39,11 @@ namespace Volo.Abp.EntityFrameworkCore
DefaultConfigureAction = action;
}
public bool IsConfiguredDefault()
{
return DefaultConfigureAction != null;
}
public void PreConfigure<TDbContext>([NotNull] Action<AbpDbContextConfigurationContext<TDbContext>> action)
where TDbContext : AbpDbContext<TDbContext>
{
@ -60,6 +65,16 @@ namespace Volo.Abp.EntityFrameworkCore
ConfigureActions[typeof(TDbContext)] = action;
}
public bool IsConfigured<TDbContext>()
{
return IsConfigured(typeof(TDbContext));
}
public bool IsConfigured(Type dbContextType)
{
return ConfigureActions.ContainsKey(dbContextType);
}
internal Type GetReplacedTypeOrSelf(Type dbContextType)
{

5
framework/src/Volo.Abp.ObjectExtending/Volo/Abp/ObjectExtending/ObjectExtensionInfo.cs

@ -2,6 +2,7 @@
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using JetBrains.Annotations;
using Volo.Abp.Data;
@ -68,7 +69,9 @@ namespace Volo.Abp.ObjectExtending
[NotNull]
public virtual ImmutableList<ObjectExtensionPropertyInfo> GetProperties()
{
return Properties.Values.ToImmutableList();
return Properties.OrderBy(t=>t.Key)
.Select(t=>t.Value)
.ToImmutableList();
}
[CanBeNull]

Loading…
Cancel
Save