OData / OData/AspNetCoreOData

Is it possible to call AddModel at runtime (not during Startup time) in V8?

Open
#31 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
C#
Stars
505
Forks
186
PR merge metrics
No merged PRs in 30d

Description

Reposting from https://github.com/OData/WebApi/issues/2347. Not sure what is the most appropriate repo for this

Version 8.0 on .NET 5

Question: Is it possible to call "AddModel" at runtime (from my own service)?
The goal is to iterate over:

  • dynamically load an assembly containing the models, dbcontext and the odata controller
  • add the odata model in a separate AssemblyLoadContext
  • make it available for requests
  • use this stuff
  • on a specific request, unload the AssemblyLoadContext from the memory (including the models, EDM, dbcontext and the odata controller)

TIA

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the AddModel registration path in ASP.NET Core OData and the AssemblyLoadContext lifecycle described in the issue. Determine whether models, the EDM, the DbContext, and the OData controller can be registered for requests and later unloaded; done requires a documented feasibility answer or a clearly scoped implementation path.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.