You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since users can support precompiled models, model building code shouldn't be needed in runtime, and we can get rid of it to reduce application size. This is especially important for AOT, but isn't necessarily coupled to it.
EF invokes model building implicitly, i.e. there's no explicit gesture for building a model. This unfortunately means that normal trimming cannot detect that model building isn't being used in the application - unless we change EF's API and introduce a breaking change around this (e.g. a new API to trigger model building, without which implicit model building doesn't occur).
We can instead use a feature switch to allow users to opt into stripping the model building code. This feature switch could be activated automatically when publishing to AOT.