Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "aaron"

Convert to UTC time zone before submitting to ASP.NET Zero server.

Show the definitions of:

  • BenefitOptionOutputDto
  • BenefitOptionPlanOutputDto
  • BenefitEnrolmentRuleOutputDto
Answer

You can invite yourself via the "Github Users" tab here: https://aspnetzero.com/LicenseManagement

var flowUnit = await flowUnitRepository.GetAll()
    .Include(fu => fu.FlowForm)
    .FirstAsync(fu => fu.Id == input.Id.Value);

Check that you have this line in Startup.cs:

routes.MapHub<ChatHub>("/signalr-chat");

Despite the fact that TravelOfferPriceProposalElement is a full audited entity. Should that not be a soft delete?

It should.

Is this a issue/shortcoming of the ISoftDelete interface combined with EF Core or is this normal behaviour? If this is normal how can we log hard deletes for fullauditedentities on a application level?

It's because EF Core sets entry.State to EntityState.Modified and foreign key to null, and implicitly deletes. It's normal in EF Core, but probably not expected for ISoftDelete concept.

You can override ApplyAbpConcepts in DbContext with this partial fix that assumes parent entity is not hard deleted:

protected override void ApplyAbpConcepts(EntityEntry entry, long? userId, EntityChangeReport changeReport)
{
    HandleImplicitDeleteForSoftDelete(entry);
    base.ApplyAbpConcepts(entry, userId, changeReport);
}

protected virtual void HandleImplicitDeleteForSoftDelete(EntityEntry entry)
{
    if (entry.State == EntityState.Modified && entry.Entity is ISoftDelete)
    {
        var foreignKeys = entry.Metadata.GetForeignKeys();

        foreach (var foreignKey in foreignKeys)
        {
            foreach (var property in foreignKey.Properties)
            {
                var propertyEntry = entry.Property(property.Name);
                if (propertyEntry.OriginalValue != null && propertyEntry.CurrentValue == null)
                {
                    entry.State = EntityState.Deleted;
                }
            }
        }
    }
}

Duplicate of https://support.aspnetzero.com/QA/Questions/4431:

For the most part, you can just change the <TargetFramework> in .csproj files from net461 to netcoreapp2.0.

It's better to download a new project with .NET Core 2.1 as framework, with the same name.

From the documentation on Abp Session:

public class MyClass : ITransientDependency
{
    public IAbpSession AbpSession { get; set; }

    public MyClass()
    {
        AbpSession = NullAbpSession.Instance;
    }

    public void MyMethod()
    {
        var currentUserId = AbpSession.UserId;
        //...
    }
}

If you want to use it in Application project, define IS3Services and a null implementation in Application project.

Showing 591 to 600 of 1543 entries