Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "maharatha"

Answer

Thanks it worked.

The AppPath is used to navigate back from the Hangfire Dashboard to the application

Question

Hi -

I have been trying to set the virtual absolute path and security in my startup.cs like the below :

app.UseHangfireDashboard("/BackgroundJobs", new DashboardOptions
            {
                Authorization = new[] { new AbpHangfireAuthorizationFilter(AppPermissions.Pages_Administration_Host_Hangfire) }
            });

            app.UseHangfireDashboard("/BackgroundJobs", new DashboardOptions
            {
                AppPath = VirtualPathUtility.ToAbsolute("~/Application/App")
            }
            );

The authorization works but the App path doesn't work. It always redirect to the root URL where as I am trying the user to redirect to the dashboard.

Am I doing it right ?

Thank You Hilkan.

That worked, but I had put a Application reference in the Entityframework few days back. So it was throwing a circular reference error.

I removed the Application reference from Entityframework and added the Entityframework reference in application and it worked.

Thank you so much.

That's the problem i am struggling with

private readonly IDbContextProvider<YourDbContext> _dbContextProvider;

I am unable to access my the DB context while declaring. It doesn't show up in intellisense as well as when i copy paste too it's doesn't recongize.

Am I missing something here .

To be more speicifc I am trying to use :

<a class="postlink" href="https://github.com/zzzprojects/EntityFramework-Plus/wiki/EF-Audit-%7C-Entity-Framework-Audit-Trail-Context-and-Track-Changes">https://github.com/zzzprojects/EntityFr ... ck-Changes</a>

I am now trying to access the Audit entry table using the code like this :

using (var ctx = new CORPACCOUNTINGDbContext()) {

            var auditlog = Z.EntityFramework.Plus.AuditExtensions.Where&lt;MyTable&gt;(ctx.AuditEntries, Id).ToList();

        }

It works fine if I put in a custom repository but I would like to create a repository which can pass "MyTable" as a parameter to the custom repository and use it wherever i like.

Else I need a way where I can access the DB context from application layer.

I tried injecting the IDbcontextprovider but probably I am not doing the right way, could you please let me know how to access the DB context from application layer.

how do I access the DB Context from application layer ?

I am trying to run code similar to below in application Layer :

using (var ctx = new TestContext()) { ctx.AuditEntries.Where(item); ctx.AuditEntries.Where<Entity_Basic>(item.ID); ctx.AuditEntries.Where<Entity_Basic>(101); }

Can you point me to the right direction ?

Probably Tenant was a bad example. I am not worried about data loss as I understand we use SoftDelete pattern. But I think it's good to throw a user friendly message if we are trying to delete a row in a table which is being used as a foreign key in another table.

Hi -

Is there a way I can check the referential integrity while deleting items ? e.g. I want to restrict Tenants to be deleted if any transaction or user is associated with that Tenant.

How do i do it ?

Hi All -

This is to get some guidance about building a notes and attachment infrastructure in my application using Abpzero.

My requirement is I should be able to add Multiple Notes or Multiple Attachments to any row in any entity.

I am looking for something like IMayHaveNotes or ImayHaveAttachments. But I am probably not able to get my head around it about the approach.

Any help is appreciated?

Answer

Hi Mike -

Could you let me know what exactly you removed to make it work ? Some code will be helpful.

Hilkan -

I copied and pasted the latest test code and still it's having issue. So I am unable to understand why it's working with the template when i download and it doesn't work in my application.

Thanks, Partha

Showing 231 to 240 of 326 entries