Activities of "rafael.gonzales"

What is the sense of keeping these two fields in "decimal" type if they are not getting added in the "CreateDto" and "UpdateDto"

For decimals, there should be a validation, if the values inserted there (min and max) are integers, then we should be able to get those values added in "CreateDto" and "UpdateDto" like the following code

        [Required]
        [Range(DemoConsts.Price MinLength, DemoConsts.Price MaxLength)]
        public decimal Price { get; set; }

In the "DemoConsts.cs" file the "Min" and "Max" const should be declared as integers too

        public const int PriceMinLength = -180;
        public const int PriceMaxLength = 180;

If you add a "boolean" value in the ABP Suite column definition, their filter selection is not localized.

The generated code in Index.cshtml.cs, adds the following code.

        [SelectItems(nameof(IsUsedBoolFilterItems))]
        public string IsUsedFilter { get; set; }

        public List<SelectListItem> IsUsedBoolFilterItems { get; set; } =
            new List<SelectListItem>
            {
                new SelectListItem("", ""),
                new SelectListItem("Yes", "true"),
                new SelectListItem("No", "false"),
            };

First, the string generated should be nullable like the following public string? IsUsedFilter { get; set; }

To avoid this warning in the constructor

The filter items are not localized and the keys "Yes" and "No" are hardcoded in any language. To solve this, I propose to add this method in AbpModel

        protected List<SelectListItem> SetFilterItems()
        {
            return new List<SelectListItem>
            {
                new SelectListItem("", ""),
                new SelectListItem(_localizer["Yes"], "true"),
                new SelectListItem(_localizer["No"], "false")
            };
        }

In ABP Suite, It should generate the Filter Items using a backend field like the following.

        [SelectItems(nameof(IsUsedBoolFilterItems))]
        public string? IsUsedFilter { get; set; }

        private List<SelectListItem>? _IsUsedBoolFilterItems;
        public List<SelectListItem> IsUsedBoolFilterItems
        {
            get { return (_IsUsedBoolFilterItems == null) ? SetFilterItems() : _IsUsedBoolFilterItems; }
            set { _IsUsedBoolFilterItems = value; }
        }

But this needs to add a localizer in the constructor of Index.cshtml and also Index.Extended.cshtml.cs (if they use custom code) to pass to AbpModel to add that method I propose.

public IndexModelBase(IStringLocalizer<DemoResource> localizer, IDemosAppService demosAppService) : base(localizer)
{
    _demosAppService = demosAppService;
}

Downloadable Excel file is not localized

[AllowAnonymous]
public virtual async Task<IRemoteStreamContent> GetListAsExcelFileAsync(DemoExcelDownloadDto input)
{
    var downloadToken = await _excelDownloadTokenCache.GetAsync(input.DownloadToken);
    if (downloadToken == null || input.DownloadToken != downloadToken.Token)
    {
        throw new AbpAuthorizationException("Invalid download token: " + input.DownloadToken);
    }

    var items = await _demoRepository.GetListAsync(input.FilterText, input.Name, input.Date, input.Price);

    var memoryStream = new MemoryStream();
    await memoryStream.SaveAsAsync(ObjectMapper.Map<List<Ubigeo>, List<UbigeoExcelDto>>(items));
    memoryStream.Seek(0, SeekOrigin.Begin);

    return new RemoteStreamContent(memoryStream, "Demos .xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
}
  • The names of the columns are not localized
  • The name of the file are not localized

Proposal for change

        public override async Task<IRemoteStreamContent> GetListAsExcelFileAsync(DemoExcelDownloadDto input)
        {
            var downloadToken = await _excelDownloadTokenCache.GetAsync(input.DownloadToken);
            if (downloadToken == null || input.DownloadToken != downloadToken.Token)
            {
                throw new AbpAuthorizationException("Invalid download token: " + input.DownloadToken);
            }

            var items = await _demoRepository.GetListAsync(input.FilterText, input.Name, input.Date, input.Price);

            var config = new OpenXmlConfiguration
            {
                DynamicColumns = new MiniExcelLibs.Attributes.DynamicExcelColumn[]
                {
                    new MiniExcelLibs.Attributes.DynamicExcelColumn("Name") { Name = L["Name"]},
                    new MiniExcelLibs.Attributes.DynamicExcelColumn("Date") { Name = L["Date"]},
                    new MiniExcelLibs.Attributes.DynamicExcelColumn("Price") { Name = L["Price"]}
                }
            };

            var memoryStream = new MemoryStream();
            await memoryStream.SaveAsAsync(ObjectMapper.Map<List<Ubigeo>, List<DemoExcelDto>>(items), configuration: config);
            memoryStream.Seek(0, SeekOrigin.Begin);

            var fileName = L["Demos"] + ".xlsx";
            return new RemoteStreamContent(memoryStream, fileName, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
        }

That would be a great change for ABP Suite generator to solve the localization of the Excel file process.

Sure, I created a Loom with the footage of the issue.

https://www.loom.com/share/0281cc2d84f24cc6950b803db9755ccf?sid=1661c041-1e0d-48b9-8cb4-9146716bc9c2

Dear EngincanV, I have also another issue with migrations. Sometimes the demo2 (with version 8.1.0.rc-1) doesn't apply any migrations at all, it's a weird bug because it happens (sometimes!!) when the project is created or when I create or update an already existing entity (It happens randomly). I will try to create a loom at the exact moment when It happens.

In the end, it's a bug from Asp.net Core. Can we have this info in the documentation? This can help other developers to know that it's not an ABP Bug but instead Microsoft and follow ms suggestion instead.

Can I get my ticket refund, please?

  • ABP Framework version: v8.1.0.rc-1

  • UI Type: MVC

  • Database System: EF Core (PostgreSQL, etc..)

  • Tiered (for MVC) or Auth Server Separated (for Angular): no

  • Steps to reproduce the issue:

While testing a demo project. I found out that decimal values are not being localized depending of the language. I am using right now Spanish (with a modification to use a dot as a decimal delimiter) and English but when I tried another language that uses a comma as a delimiter (Italian for example). It doesn't show as expected. I attached a photo of the issue

  • ABP Framework version: v8.1.0.rc-1

  • UI Type: MVC

  • Database System: EF Core (PostgreSQL, etc..)

  • Tiered (for MVC) or Auth Server Separated (for Angular): no

  • Steps to reproduce the issue:

When you use ABP Suite and create an Entity with the following information

When you set your columns and for some reasons the ABP Suite throws an Excepetion. All your entity configuration gets deleted

Note: Please, would be helpful for us to create a topic for 8.1.x Bugs and Issues. I only have 5 remaining questions available and I have more issues to report.

Thanks!

Please, don't ignore us!

Hello,

Can someone create the "Bugs & Issues v8.1.x"?

Thanks!

It seems that it still requires a PFX. If I delete the openiddict.pfx or comment this line in my WebModule.cs, the application doesn't work

         PreConfigure&lt;OpenIddictServerBuilder&gt;(serverBuilder =>
         {
             serverBuilder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", "1234");
        });
Showing 81 to 90 of 177 entries
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.1.0-preview. Updated on October 30, 2025, 06:33