Activities of "rafael.gonzales"

In the ABP Suite generated code, there is a massive abuse of the #pragma warning disable CS8618

Instead of disabling the warnings, can we replace those with the "required" modifier to follow a more organic approach?

A solution is suggested.

In the ABP Suite Generated code, there is an issue in the generated class test/Demo74rc1.TestBase/EntityDemos/EntityDemosDataSeedContributor.cs

Do we need a null validation in await _unitOfWorkManager.Current.SaveChangesAsync(); ?

Current property is nullable and there will be a warning or error (if WarningAsNull is activated)

In the ABP Suite generated Entity in src/Demo74rc1.Domain/EntityDemos/EntityDemo.cs

There is no need to add an empty constructor. It will generated a Warning or Error (if WarningAsError is activated).

Can you consider removing it from the template?

This also happens in the .Extended version of the Entity generated class. The empty constructor should be removed from the template.

In the AppService generated by ABP Suite, there is an issue in some methods in the AppService if a non-nullable string property is created in an entity.

src/Demo74rc1.Application/EntityDemos/EntityDemosAppService.cs

A solution could be to use the Check.NotNull method

Adding this before the CreateAsync and UpdateAsync method call in the AppService generated class solve this issue.

input.StringColumn = Check.NotNull(input.StringColumn, nameof(input.StringColumn));

In the AppService generated by ABP Suite, there is an issue in some methods in the AppService if a non-nullable string property is created in an entity.

src/Demo74rc1.Application/EntityDemos/EntityDemosAppService.cs

A solution could be to use the Check.NotNull method

Adding this before the CreateAsync method call

input.StringColumn = Check.NotNull(input.StringColumn, nameof(input.StringColumn));

In ABP Suite Generated Code.

In the DbContext generated,

src/Demo74rc1.EntityFrameworkCore/EntityFrameworkCore/Demo74rc1DbContext.cs

Can you add a null-forgiving operator in the generated DbSet?

This is to avoid a Warning or Error (if WarningAsError is activated)

In ABP Suite, there is an update in the entity generator, whenever you select a string, there is a new option to allow empty strings but it's only enabled when the "Required" option is checked.

What is the sense of allowing empty strings if it's required? Why not allow Nullable strings in the ABP Suite entity generator?

ABP Framework version: v7.4.0.rc-1 UI Type: MVC Database System: EF Core (PostgreSQL) Tiered (for MVC) or Auth Server Separated (for Angular): no

In a nullable reference-enabled project, there is a missing "?" in the parameter of MapHealthChecksUiEndpoints

Actual version:

    private static IServiceCollection MapHealthChecksUiEndpoints
        (this IServiceCollection services, 
            Action<global::HealthChecks.UI.Configuration.Options> setupOption = null)
    {
        services.Configure<AbpEndpointRouterOptions>(routerOptions =>
        {
            routerOptions.EndpointConfigureActions.Add(endpointContext =>
            {
                endpointContext.Endpoints.MapHealthChecksUI(setupOption);
            });
        });
        return services;
    }

It should be:

    private static IServiceCollection MapHealthChecksUiEndpoints
        (this IServiceCollection services, 
            Action<global::HealthChecks.UI.Configuration.Options>? setupOption = null)
    {
        services.Configure<AbpEndpointRouterOptions>(routerOptions =>
        {
            routerOptions.EndpointConfigureActions.Add(endpointContext =>
            {
                endpointContext.Endpoints.MapHealthChecksUI(setupOption);
            });
        });
        return services;
    }

ABP Framework version: v7.4.0.rc-1 UI Type: MVC Database System: EF Core (PostgreSQL) Tiered (for MVC) or Auth Server Separated (for Angular): no

If <WarningsAsErrors>Nullable</WarningsAsErrors> is enabled, there is an issue with the property name.

It suggested adding the "required" modifier to solve this issue as shown next.

ABP Framework version: v7.4.0.rc-1 UI Type: MVC Database System: EF Core (PostgreSQL) Tiered (for MVC) or Auth Server Separated (for Angular): no

In src/Demo74rc1.Domain/OpenIddict/OpenIddictDataSeedContributor.cs

There is a possible null reference argument in that method (in visual studio and rider) because it's using the ABP wrapper of string.IsNullOrWhiteSpace(str)

If I replace the

if (!webPublicClientId.IsNullOrWhiteSpace()) with this if (!string.IsNullOrWhiteSpace(webPublicClientId))

The issue with the compiler disappeared.

Showing 131 to 140 of 153 entries
Learn More, Pay Less
33% OFF
All Trainings!
Get Your Deal
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.0.0-preview. Updated on September 16, 2025, 10:35