Open Closed

ABP SUITE #1372


User avatar
0
lstsair created
  • ABP Framework version: v4.3.1
  • UI type: Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:

In ABP Suite, I set the UI Pick type as Typeahead, and tick Required. Then generate the code. The message prompt Error.

Then I build the Solution, the error show as below :

Severity	Code	Description	Project	File	Line	Suppression State
Error	CS1061	'Guid' does not contain a definition for 'Value' and no accessible extension method 'Value' accepting a first argument of type 'Guid' could be found (are you missing a using directive or an assembly reference?)	SecCloud.Blazor	C:\Appl\MyProjects\SecCloud\aspnet-core\src\SecCloud.Blazor\Pages\RegDirs.razor.cs	173	Active

The code generated by ABP SUITE as below :

       private async Task GetClientLookupAsync(string text = null)
        {
            Clients = (await RegDirsAppService.GetClientLookupAsync(new LookupRequestDto { Filter = text })).Items
            .Select(i=> new LookupDto<Guid> { Id = i.Id.Value, DisplayName = i.DisplayName} ).ToList();
        }

How to solved this issue?


4 Answer(s)
  • User Avatar
    0
    alper created
    Support Team Director

    is it duplicate of https://support.abp.io/QA/Questions/1289/problem-with-navigation-properties-in-abp-suite?

  • User Avatar
    0
    lstsair created

    actualy the message is .Select(i=> new LookupDto<Guid> { Id = i.Id.Value, DisplayName = i.DisplayName} ).ToList(), that is no i.id.Value property("Value") this only happen when I tick Require in Navigation Properties.

  • User Avatar
    0
    alper created
    Support Team Director

    I understood the issue can you remove the marked keyword seen on the screenshot

  • User Avatar
    0
    ServiceBot created
    Support Team Automatic process manager

    This question has been automatically marked as stale because it has not had recent activity.

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