Starts in:
1 DAY
18 HRS
16 MIN
13 SEC
Starts in:
1 D
18 H
16 M
13 S

Activities of "lataing"

@liangshiwei Hello, I didn't find the <YourProjectName>BundleContributor.cs file. Can you tell me the exact location?

I created the module through suite, and did not make any changes, just run it directly. And when I run BSDemo.IdentityServer, I need to wait many minutes, which is much slower than running BSDemo.Web.Unified directly. It took 5.1 minutes to display the successful login

By the way, for the module I created, I added a page to BSDemo.Blazor.Server project. How can I run blazor server to view it?

  • ABP Framework version: v4.3.0
  • UI type: Blazor Module
  • Exception message and stack trace:
  • Steps to reproduce the issue: Run the BSDemo.IdentityServer and BSDemo.HttpApi.Host projects, and then run BSDemo.Blazor.Host, but it can't be started and stays on the loading page. Why?

ABP Framework version: v4.3.0 rc1 UI type: MVC How do I want to add attributes to these two entities?

Volo.Abp.Account.Public.Web.Pages.Account.RegisterModel.PostInput

The following method cannot be used. ObjectExtensionManager.Instance.AddOrUpdateProperty<RegisterDto, string>("Title");

Hello, @maliming. I see that every module has an extension method like this.

The attribute is extended as follows, but I don't know how to set the value for the SocialSecurityNumber attribute or how to get the value.

No unit test, case or document was found. Can you explain it for me?

Another problem is that if I can't add properties to RegisterDto, I need to rewrite AccountAppService instead of just the RegisterAsync method.

My registerdto doesn't inherit the ihasextrapropertie interface and doesn't contain the setproperty method. When I call it, I report an error. Don't I need to set anything?

Can someone help me with this problem? thank you.

Can you give me an example of how to access this new property? I don't understand. thank you.

I've read the document carefully for many times, and I don't know how to access it so that it can be displayed on the UI, and set and get values.

https://docs.abp.io/en/abp/latest/Module-Entity-Extensions

I have written how to add a new property, but I don't know how to set the referenced property.

How do I set and get it? registerDto.SetProperty("PhoneNumber", "0123456789"); Methods like this are not available. Can you give me some examples?

https://docs.abp.io/en/abp/latest/Module-Entity-Extensions#create-update-forms https://docs.abp.io/en/abp/latest/Module-Entity-Extensions#data-table

you can add extra property to the current Tenant object. Open YourProjectModuleExtensionConfigurator.cs and replace the ConfigureExtraProperties() method with below:

    private static void ConfigureExtraProperties() 
    { 
        OneTimeRunner.Run(() => 
        { 
            ObjectExtensionManager.Instance.Modules() 
                .ConfigureSaas(x => 
                { 
                    x.ConfigureTenant(tenant => 
                    { 
                        tenant.AddOrUpdateProperty<string>( 
                            "MyExtraProperty", 
                            property => 
                            { 
                                //validation rules 
                                property.Attributes.Add(new RequiredAttribute()); 
                                property.Attributes.Add( 
                                    new StringLengthAttribute(64) 
                                    { 
                                        MinimumLength = 4 
                                    } 
                                ); 
 
                                //...other configurations for this property 
                            } 
                        ); 
                    }); 
                }); 
        }); 
    } 

Ref: https://docs.abp.io/en/abp/latest/Module-Entity-Extensions

I still don't understand. I need to add properties to registerdto. Why configure tent object?

HI,

AppName is your front-end type, can be web, ios, angular.... . It can also be any value.

You can create a new appservices like:

[Dependency(ReplaceServices = true)] 
[ExposeServices(typeof(IAccountAppService))] 
public class  MyAccountAppService : AccountAppService 
{ 
 
 
    public MyAccountAppService(IdentityUserManager userManager, IAccountEmailer accountEmailer, IAccountPhoneService phoneService, IIdentityRoleRepository roleRepository, IdentitySecurityLogManager identitySecurityLogManager, IBlobContainer<AccountProfilePictureContainer> accountProfilePictureContainer, ISettingManager settingManager, IOptions<IdentityOptions> identityOptions) : base(userManager, accountEmailer, phoneService, roleRepository, identitySecurityLogManager, accountProfilePictureContainer, settingManager, identityOptions) 
    { 
    } 
 
    public async Task<IdentityUserDto> MyRegisterAsync(MyRegisterDto input) 
    { 
        var result =await base.RegisterAsync(new RegisterDto() {....}); 
 
        var user = await UserManager.FindByIdAsync(result.Id.ToString()); 
 
        user.Surname = input.SurName; 
            ..... 
 
        await UserManager.UpdateAsync(user); 
    } 
} 

I can't refer to myregisteraasync because the iaccountappservice interface doesn't have it. I can't refer to the myregisteraasync method.

What should I do?

  • ABP Framework version: v4.2.0
  • UI type: MVC

How do I want to add attributes to these two entities?

Volo.Abp.Account.RegisterDto Volo.Abp.Account.Public.Web.Pages.Account.RegisterModel.PostInput

The following method cannot be used. ObjectExtensionManager.Instance.AddOrUpdateProperty<RegisterDto, string>("Title");

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