About 52,700 results
Open links in new tab
  1. Creating and Configuring a Model - EF Core | Microsoft Learn

    Mar 27, 2023 · You can override the OnModelCreating method in your derived context and use the fluent API to configure your model. This is the most powerful method of configuration and …

  2. c# - Purpose of OnModelCreating - EF Core Database first …

    Apr 8, 2022 · it is what I want to know. "If you follow the Entity framework model naming convention and your model directly reflects your database table name, column names and so …

  3. EF core modelbuilder: Registering and Configuring Entities

    Discover how to define and configure entity models in EF Core using POCO classes. Learn to register entities with DbSet<T> or the OnModelCreating method and customize conventions …

  4. c# - When does EFCore OnModelCreating get invoked? - Stack Overflow

    Oct 10, 2018 · OnModelCreating is called by the framework when it is created the first time to make the models and map into memory. It provides you a way to configure the model class …

  5. Using Reflection to Create a Dynamic OnModelCreating in EF

    Mar 24, 2020 · In this article, we are going to showcase an example where we invoke static "OnModelCreating" methods from entities that are part of our Entity Framework's DB Context …

  6. DbContext.OnModelCreating(ModelBuilder) Method (Microsoft ...

    On Model Creating (ModelBuilder) Method. Override this method to further configure the model that was discovered by convention from the entity types exposed in DbSet<TEntity> properties …

  7. Creating A Model -EF Core. EF Core uses a metadata model to

    Apr 6, 2024 · You can override the OnModelCreating method in your derived context and use the fluent API to configure your model. This is the most powerful method of configuration and …

  8. EFCore Tutorial P4:Cleaning Up `OnModelCreating` - DEV …

    Sep 13, 2024 · To keep the code clean, maintainable, and scalable, it’s important to modularize the entity configurations. In this article, we’ll explore three approaches to clean up the …

  9. EntityFrameworkCore中的OnModelCreating - Hello——寻梦者!

    Apr 2, 2019 · 在我们使用EntityFrameworkCore作为数据库ORM框架的时候,不可避免的要重载DbContext中的一个虚方法OnModelCreating,那么这个方法到底是做什么的? 到底有哪些作 …

  10. c# - Entity Framework Core OnModelCreating vs Migration, the …

    OnModelCreating enables you to use the 'Fluent API', which is more powerful and flexible, but/and detaches the persistence logic somewhat from your entities. Sometimes you use a mix …

Refresh