Can you help me on this ?
Thank You for the response.
Now I found this ZZZ framework to be more useful for second level caching :
// using Z.EntityFramework.Plus; // Don't forget to include this. var ctx = new EntitiesContext();
// The first call perform a database round trip var countries1 = ctx.Countries.FromCache().ToList();
// Subsequent calls will take the value from the memory instead var countries2 = ctx.Countries.FromCache().ToList();
I am not sure how to use it as the repositories does provide the FromCache property.
i am more interested in Second Level Cache for Entity Framework 6.1
<a class="postlink" href="https://efcache.codeplex.com/">https://efcache.codeplex.com/</a>
Can you let me know where should I make the changes to have this implemented in my project.
Thank you for all your help so far.
Thank you sir !!!
I am also evaluating cached db for model store as mentioned below :
<a class="postlink" href="https://www.fusonic.net/en/blog/3-steps-for-fast-entityframework-6.1-code-first-startup-performance/">https://www.fusonic.net/en/blog/3-steps ... rformance/</a>
can you throw some light on how I can implement this with respect to ABP
Thanks it worked.
The AppPath is used to navigate back from the Hangfire Dashboard to the application
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<MyTable>(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.
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 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