Activities of "joe@tronactive.com"

I am having a similar issue. WHat do you mean rearraning theme?

  • UI type: Angular
  • Tiered (MVC) or Identity Server Seperated (Angular): yes

I need to use the GetDbContext from a repository just like in these documents https://docs.abp.io/en/abp/1.0/Entity-Framework-Core it states about 3/4 down on the page "GetDbContext returns a DbContext reference instead of BookStoreDbContext. You can cast it, however in most cases you don't need it."

I need to do this since my project has several DbContexts but I haven't found a good way to cast it yet. Do you have any examples or suggestion?

Thank you for the suggestion, I can do it that way but I want it to work like a ABP entity and work wth ABPs repository system.

  • ABP Framework version: v3.1.0
  • UI type: Angular
  • Tiered (MVC) or Identity Server Seperated (Angular): no

I have a view in the DB and a class that I have no problem adding to my DBContext and accessing through a different entity reposittory through the dbsets. But I want to create a repository specifically for this view. But I am unsure the best method for it.

I was thinking just base : Entity with no ID but I have to use a composit keys then and technically I do not have any setup. Any suggestions would be greatly appreciated. Thank you

Hello, I have a background hangfire Job that checks a directory and if there is a specific file in that directory it sets a bool in the DB. My issue is, I though the UniteOfWork.SaveChangesAsync would commit the transaction after each save so that it didn't lock the DB. But it is not working and still locks the DB. This job itterates large numbers of files, like around 500,000 or so. so it takes a very long time to run. What am I doing wrong? I tried COmpleteAsync but that threw a Object not set to an instance exception. I am not entirely sure what CompleteAsync does as I did not find much documentation on it.

Thank you for any help

This is great thank you. So basically when I need to switch the customer context I will call the CustomConnectionStringResolver and just pass in the new connection string? or how is the resolver called?

  • ABP Framework version: v3.1
  • UI type: Angular
  • Tiered (MVC) or Identity Server Seperated (Angular): Tiered Entity Framework SQL Server

I have 3 DB contexts, my main one for the ABP API database, two others that connect to two DBs that we already had and all works just fine.

We have one database that has Customer table in it and a Connection table. The Connection table holds DB connections for each customers. This is NOT the main ABP database. But what I want to do is split out Customer specific databses similar to how tenant specific DBs are done in ABP. I want to create a CustomConnectionStringResolver pass in a customer ID to queury the Connection table to get the customer specific DB connection string. Then change the connectionString of our CustomerDbContext to the Customer Specific database instead of the default one. I have done this in other projects that use just basic EntityFramework and no ABL but not that works with ABP and the ConnectionStringNameAttribute. I want to do this with a DbContext that inherits from AbpDbContext<CustomerDbContext> and uses the ConnectionStringNameAttribute.

Any help would be appreciated.

I understand I can, I guess I am just having a hard time how to. Thanks though

Sorry I should have explained it better. I want to create multiple Queues. This only works with just one.

Thank you for the help. What method would this attribute go above then? Would it be the one that does the work? or above the Execute method in the below job class?

` public class RenderChartJob : BackgroundJob

    public RenderChartJob(IChartsAppService chartsAppService)
    {
        _chartsAppService = chartsAppService;
    }

    public override void Execute(RenderChartsJobArgs args)
    {
        args.Subject = "Job Scheduled to Render Chart to PDF";
        args.Body = $"Job rendering chart successful. ";


        try
        {
            //Pass in Render chart input and render chart to PDF
           _chartsAppService.RenderChartToPdf(args.RenderChartInput);
            
            //We will not be rescheduling this since it is a one time execution
            args.Body = $"{DateTime.UtcNow}: {args.Body}";
            emailSender.Send(args.FromEmail, args.ToEmail, args.Subject, args.Body);

        }
        catch (Exception e)
        {
            throw new Exception(e.StackTrace);
        }
    }
}`
Showing 71 to 80 of 85 entries
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11