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.BaseInputComponent
1[[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;
}
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,
Got it. Works great.
Thank you!
Where is the application management page? In interface or in code? I couldn't fine neither. Can you show a screenshot?