Open Closed

abp suite code generating error #1303


User avatar
0
lstsair created
  • ABP Framework version: v4.3.0

  • UI type: Blazor

  • DB provider: EF Core / MSSQL

  • Tiered (MVC) or Identity Server Separated (Angular): no

  • Exception message and stack trace:

  • Steps to reproduce the issue: abp suite generate the code error with no argument

  • code below is generated by abp suite protected override async Task OnInitializedAsync() { await SetToolbarItemsAsync(); await SetBreadcrumbItemsAsync(); await SetPermissionsAsync(); await GetNullableStateLookupAsync();
    await GetNullableCountryLookupAsync(); }

      Severity	Code	Description	Project	File	Line	Suppression State
    

Error CS7036 There is no argument given that corresponds to the required formal parameter 'newValue' of 'Towns.GetNullableCountryLookupAsync(string)' SecCloud.Blazor C:\Appl\MyProjects\SecCloud\aspnet-core\src\SecCloud.Blazor\Pages\Towns.razor.cs 59 Active

    Severity	Code	Description	Project	File	Line	Suppression State

Error CS7036 There is no argument given that corresponds to the required formal parameter 'newValue' of 'Towns.GetNullableStateLookupAsync(string)' SecCloud.Blazor C:\Appl\MyProjects\SecCloud\aspnet-core\src\SecCloud.Blazor\Pages\Towns.razor.cs 58 Active


1 Answer(s)
  • User Avatar
    0
    lstsair created

    I fixed this by add newValue = null into the code as below:

       private async Task GetNullableStateLookupAsync(string newValue = null )
        {
            StatesNullable = (await TownsAppService.GetStateLookupAsync(new LookupRequestDto { Filter = newValue })).Items;
        }
    
    
        private async Task GetNullableCountryLookupAsync(string newValue = null )
        {
            CountriesNullable = (await TownsAppService.GetCountryLookupAsync(new LookupRequestDto { Filter = newValue })).Items;
        }
        
    

    And then manually do add migration as below: Add-Migration "20210512111200_Added_Town" -Context MigrationsDbContext

    This may help the topic : problem with navigation properties in abp suite #1289

Made with ❤️ on ABP v9.1.0-preview. Updated on November 11, 2024, 11:11