Activities of "jeffbuot14@gmail.com"

Yeah I asked him it was working on his machine but not mine 🤔, we checked the same commit.

Hi, I tried using --without-contracts, it's weird I'm getting this exception:

Hi, I sent it through your email.

Hi, This one isn't upgrading. I created a fresh project template from abp suite. Also i tried abp clean then dotnet build but no luck.

Hi,

I did not change the generated client proxy's namespace.

Hi, I tried again just now, it's still showing the same error.

  • ABP Framework version: v7.0.1
  • UI type: Blazor Server
  • DB provider: EF Core
  • Project Template: Microservice
  • Steps to reproduce the issue:"
    • Created new microservice project template from abp suite
    • Updated the connection strings to correct db
    • Added microservice project "Global"
    • Added entities to domain in Global.Domain
    • Added repositories to Global.EfCore
    • Added services for Global.Application.Contracts and Global.Application
    • Added controller to Global.HttpApi
    • Run the host for Global
    • Generated client proxy with this command abp generate-proxy -t csharp -u https://localhost:44395/ -m globalService
    • Used the generated client proxy on a wpf app that is already added as application client in openiddict Identity Service. Theb this annoying error happens: The API description of the CmvPoint.GlobalService.Controllers.IDataReferenceAppService.GetNextReferenceIdAsync method was not found!

Even trying to change the configuration on the client module using AddStaticHttpClientProxies and AddHttpClientProxies isn't working.

  • ABP Framework version: v7.0.1

  • UI type: Blazor Server

  • DB provider: EF Core

  • Project Template: Microservice

  • Steps to reproduce the issue:"

    • Created new microservice project template from abp suite
    • Updated the connection strings to correct db
    • Run the migrator
    • Run the Administration host and it is giving me error.
  • Exception message and stack trace: [08:14:01 FTL] Dummy.AdministrationService.HttpApi.Host terminated unexpectedly! System.IO.FileNotFoundException: Could not load file or assembly 'Volo.Abp.Commercial.SuiteTemplates, Version=7.0.1.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.

File name: 'Volo.Abp.Commercial.SuiteTemplates, Version=7.0.1.0, Culture=neutral, PublicKeyToken=null'

  • ABP Framework version: 6.0.2
  • DB provider: EF Core I have an interface with an entity:
public interface IReferenceObject{
    string ReferenceId {get;}
}

public class Book : FullAuditedAggregateRoot<Guid>, IReferenceObject{
    public Book(Guid id, string referenceId){
        Id = id;
        ReferenceId = referenceId;
    }    
    public string ReferenceId { get; }    
    public string Title { get; set; }
}

My goal is to subscribe on create event to every entities that inherits the IReferenceObject. I read the documentation here https://docs.abp.io/en/abp/latest/Local-Event-Bus#pre-built-events and tried this:

public class ReferenceObjectEventHandler : ILocalEventHandler<EntityCreatedEventData<IReferenceObject>>, ITransientDependency

{
    public async Task HandleEventAsync(EntityCreatedEventData<IReferenceObject> eventData)
    {
        Console.WriteLine($"Created an entity with reference id {eventData.Entity.ReferenceId}");
    }
}

But it's not working..any suggestion?

Hi, you can try this:

Install the DevExpress.Xpo.EFCore NuGet package in your project. Create a class that inherits from the DevExpress.Xpo.XpoDbContext base class, this class represents the database context.

public class MyDbContext : XpoDbContext
{
    public MyDbContext(DbContextOptions<MyDbContext> options)
        : base(options)
    {
    }
}

Create entity:

[Persistent("MyEntity")]
public class MyEntity : XPLiteObject
{
    [Key]
    [Persistent("MyId")]
    public int MyId { get; set; }

    [Persistent("MyProperty")]
    public string MyProperty { get; set; }
}

If your model has relationship you can refer to this article: https://docs.devexpress.com/eXpressAppFramework/402958/business-model-design-orm/business-model-design-with-entity-framework-core/relationships-between-entities-in-code-and-ui

Register the dbcontext and XpoDbContextOption in your module and define your custom repository:

public interface IMyEntityRepository: IRepository<MyEntity >
{
    Task<List<MyEntity>> GetListAsync(
        string filterText = null,
        string sorting = null,
        int maxResultCount = int.MaxValue,
        int skipCount = 0,
        CancellationToken cancellationToken = default);
}

public class MyEntityRepository: EfCoreRepository<MyDbContext, MyEntity >, IMyEntityRepository
{
  public async Task<List<MyEntity>> GetListAsync(string filterText = null, string sorting = null,
        int maxResultCount = int.MaxValue, int skipCount = 0, CancellationToken cancellationToken = default)
    {
        var query = await GetQueryableAsync();
        query = query
            .WhereIf(filterText != null, d => d.Name.Contains(filterText))
            .OrderBy(string.IsNullOrWhiteSpace(sorting) ? MyEntityConsts.GetDefaultSorting(false) : sorting);
        return await query.PageBy(skipCount, maxResultCount).ToListAsync(cancellationToken);
    }
}
[DependsOn(typeof(AbpEfCoreModule))]
public class MyModule : AbpModule
{
    public override void ConfigureServices(ServiceConfigurationContext context)
    {
        context.Services.AddAbpDbContext<MyDbContext>(options =>
        {
            options.AddDefaultRepositories();
            options.AddRepository<IMyEntityRepository, MyEntityRepository>();
        });
    }
}

In your application service module you can:

public class MyService : ApplicationService
{
    private readonly IMyEntityRepository _myEntityRepository;

    public MyService(IMyEntityRepository myEntityRepository)
    {
        _myEntityRepository = myEntityRepository;
    }

    public async Task<MyEntity> GetAsync(int id)
    {
        return await _myEntityRepository.FirstOrDefaultAsync(x => x.MyId == id);
    }
}
Showing 1 to 10 of 57 entries
Made with ❤️ on ABP v8.3.0-preview Updated on July 05, 2024, 15:13