Activities of "fgao@primarypartnercare.com"

Got it. I always overlook the suffix of Blazorise. I fixed it and errors gone. Thank you!

Yeah, I tested it by seeding a row. It works just as expected. Thank you!

However, if I run Blazor and try to show this entity, it pops up an error after the list loaded: An internal error occurred during your request! There also is a console message as below:

8 crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100] Unhandled exception rendering component: Unable to set property 'text' on object of type 'Blazorise.TextEdit'. The error was: Specified cast is not valid. System.InvalidOperationException: Unable to set property 'text' on object of type 'Blazorise.TextEdit'. The error was: Specified cast is not valid. ---> System.InvalidCastException: Specified cast is not valid. at Microsoft.AspNetCore.Components.Reflection.PropertySetter.CallPropertySetter[TextEdit,String](Action2 setter, Object target, Object value) at Microsoft.AspNetCore.Components.Reflection.PropertySetter.SetValue(Object target, Object value) at Microsoft.AspNetCore.Components.Reflection.ComponentProperties.<SetProperties>g__SetProperty|3_0(Object target, PropertySetter writer, String parameterName, Object value) --- End of inner exception stack trace --- at Microsoft.AspNetCore.Components.Reflection.ComponentProperties.<SetProperties>g__SetProperty|3_0(Object target, PropertySetter writer, String parameterName, Object value) at Microsoft.AspNetCore.Components.Reflection.ComponentProperties.SetProperties(ParameterView& parameters, Object target) at Microsoft.AspNetCore.Components.ParameterView.SetParameterProperties(Object target) at Microsoft.AspNetCore.Components.ComponentBase.SetParametersAsync(ParameterView parameters) at Blazorise.BaseComponent.SetParametersAsync(ParameterView parameters) at Blazorise.BaseInputComponent1[[System.String, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].<>n__0(ParameterView parameters) at Blazorise.BaseInputComponent`1.

Any idea?

The thing is that the entity inherits from FullAuditedAggregateRoot<int>. See below code from abp tutorial. The Author entity's internal constructor needs ": base(id)". I tried removing "Guid id", but not sure how to handle "base(id)". If I remove "base(id)", it results null values on all audited columns. Can you show me how to modify the code around "internal Author constructor"?

public class Author : FullAuditedAggregateRoot<Guid> {......}

private Author()
{
    /* This constructor is for deserialization / ORM purpose */
}

internal Author(
    **Guid id,**// ????
    string name,
    DateTime birthDate,
    string? shortBio = null)
**    : base(id)** //????
{
    SetName(name);
    BirthDate = birthDate;
    ShortBio = shortBio;
}
  • ABP Framework version: v8.2.0
  • UI Type: Blazor WASM
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): no
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

I need to use an entity with <int> type key. It is similar as "Author" entity in abp's tutorial, but instead of using <int> as key type, e.g. "public class MyEntity : FullAuditedAggregateRoot<int>{}".

The "Author" entity uses <Guid> type for key, so it can use "GuidGenerator.Create()" to assign a key before inserting. I wonder how to make a similar CreateAsync() method in "public class MyEntityManager : DomainService{}" for inserting a new instance of MyEntity to db. Can you give me a code example?

Thanks,

Answer

Got it. Works great.

Thank you!

Answer

Where is the application management page? In interface or in code? I couldn't fine neither. Can you show a screenshot?

Answer

Just tried changing that. The new error is "error": "unauthorized_client",

Answer

I also tried client_id and scope from swagger authorize page. This time, the error changed as "error": "invalid_client"

Answer

Showing 1 to 10 of 20 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 11, 2024, 11:11