C#
C#

help

Root Question Message

Saba Jangidze
Saba Jangidze1/27/2023
❔ Hello, Fluent Api

Hi, I have fluent api in my project, I made configuration in another library after I use modelBuilder.ApplyConfiguration() function in DbContext in OnModelCreating function. It works but I dont like this approach because every time when I add new configuration I also add new function in OnModelCreating function, What else I can do ?
Troom
Troom1/27/2023
https://www.learnentityframeworkcore.com/configuration/fluent-api

protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.ApplyConfigurationsFromAssembly(Assembly.GetExecutingAssembly());
}
ContactFrequently Asked QuestionsJoin The DiscordBugs & Feature RequestsTerms & Privacy