Open Closed

How can we use IModelCacheKeyFactory with abp ef core ? #1861


User avatar
0
selinkoykiran created

Hello ,

We want to use ef core IModelCacheKeyFactory feature to able to create differently named tables with same entity. I'm sharing the link below which is similar with our case : https://yanxiaodi.medium.com/mapping-the-model-to-multiple-tables-with-entityframework-core-b46bdeed8661

So, I've searched and taken a look to this page https://docs.abp.io/en/abp/latest/Entity-Framework-Core . I just couldn't figure out how can we implement this scenario. I've checked MapEfCoreDbContext and EfCoreEntityExtensionMappings concepts. I need to make that implementation before dbcontext creation , so could you help us about that issue?

Thank you.

Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.

If you're creating a bug/problem report, please include followings:

  • ABP Framework version: v4.4.0
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes / no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

1 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    MapEfCoreDbContext and EfCoreEntityExtensionMappings is unrelated to IModelCacheKeyFactory

    I think you can try to implement the steps mentioned in the article in the DbContext of your project.

    You can create a new project of 4.4.2, it has only one DbContext

Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11