Activities of "liangshiwei"

Hi,

My email is shiwei.liang@volosoft.com

Which one of the three questions are answering with that link? Number 1?

All questions, RegisterDto is extensible, you can set any properties you need.

I would need to include the First and Surname of the user. Would I have to extend the current AccountAppService and override the RegisterAsync method

Yes, you have to.

For my 3rd question, for extending the UserIdentity, I can just use SetProperty on the IdentityUser, I believe since I am using MongoDb, it should make a difference in regards to searching by the stripeId as it should just add a property onto the document... correct?

For MongoDB, they are stored as separate fields of the document. https://docs.abp.io/en/abp/latest/Customizing-Application-Modules-Extending-Entities#extra-properties

For example:

var builder = Builders<IdentityUser>.Filter;
var query = builder.Eq("stripeId", Value);
var users = await (await userRepository.GetCollectionAsync()).Find(query).ToListAsync();

Hi,

I can't reproduce the problem, could you provide the full steps to reproduce? thanks.

Hi,

See: https://docs.abp.io/en/commercial/latest/abp-suite/generating-crud-page#navigation-properties

ABP Suite allows you to create a navigation property for 1-to-many (1:N) and many-to-many (N:N) relationships.

You can't do it with the ABP suite, but it's easy to do yourself:

public class MyEntity1 : AggregateRoot<Guid>
{
    public MyEntity1(Guid id)
    {
        Id = id;
    }

    public string Name { get; set; }

    public Guid MyEntity2Id { get; set; }
    public virtual MyEntity2 MyEntity2 { get; set; }
}

public class MyEntity2 : AggregateRoot<Guid>
{
    public MyEntity2(Guid id)
    {
        Id = id;
    }


    public string Name { get; set; }

    public Guid MyEntity1Id { get; set; }
    public virtual MyEntity1 MyEntity1 { get; set; }
}

public DbSet<MyEntity1> MyEntityTest { get; set; }
public DbSet<MyEntity2> MyEntityTest2 { get; set; }

builder.Entity<MyEntity1>(b =>
{
    b.HasOne(x => x.MyEntity2)
        .WithOne(x => x.MyEntity1)
        .HasForeignKey<MyEntity2>(x => x.MyEntity1Id)
        .OnDelete(DeleteBehavior.Cascade);
});
public class TestAppService : QaAppService
{
    private readonly IRepository<MyEntity1> _myEntity1Repository;

    public TestAppService(IRepository<MyEntity1> myEntity1Repository)
    {
        _myEntity1Repository = myEntity1Repository;
    }

    public async Task CreateAsync()
    {
        var entity1Id = GuidGenerator.Create();
        var entity2Id = GuidGenerator.Create();
        var entity = new MyEntity1(entity1Id)
        {
            Name = "test",
            MyEntity2Id = entity2Id,
            MyEntity2 = new MyEntity2(entity2Id)
            {
                MyEntity1Id = entity1Id,
                Name = "test2"
            }
        };

        await _myEntity1Repository.InsertAsync(entity);
    }

    public async Task DeleteAsync()
    {
        var entity = await (await _myEntity1Repository.GetQueryableAsync()).Include(x=>x.MyEntity2).FirstOrDefaultAsync();

        await _myEntity1Repository.DeleteAsync(entity);
    }
}

Deleting a Myentity1 will also delete the Myentity2, but, of course, not the other way around

Note: Only deleting the principal entity will cascade delete the dependent entity. Vice-versa is not possible.

If you want to delete any entity, the records of other tables will be deleted. You need to delete them manually.

Hi,

Because the Olympic.Trader is a module template and it does not reference the identity module.

You need to install the Volo.Abp.Identity.Pro.EntityFrameworkCore and Volo.Abp.Identity.Pro.Domain to the test project.

PS: The TestData need to implement the ISingletonDependency interface

Hi,

I see you are trying to install the identity server module, don't do it. because you don't actually need it.

Please remove all identity server packages.

Hi,

I can run the unit tests without any errors.

Am I missing something?

Hi,

Abp templates no longer use identityserver from 6.0, there is no Identity Server menu.

Did you make changes to the template? it's better if you can share a project with me. shiwei.liang@volosoft.com thanks.

Hi,

I could not reproduce the problem as the steps:

I got this error (command line error):

Could you share the SampleA error logs ?(not command line error)

Hi,

I will check it.

Showing 111 to 120 of 2428 entries
Made with ❤️ on ABP v9.1.0-rc.1. Updated on January 17, 2025, 14:13