Entity Framework اسئلة واجوبة المقابلات
سؤال 11. Explain the concept of migrations in Entity Framework.
Migrations are a way to manage database schema changes over time. They allow you to evolve your database schema as your application evolves.
سؤال 12. What is the purpose of the Fluent API in Entity Framework?
The Fluent API is an alternative to the Data Annotations for configuring the model in Entity Framework. It provides a more programmatic way to configure the database schema.
سؤال 13. How can you perform eager loading using Include method in Entity Framework?
The Include method is used to specify related entities that should be loaded along with the main entity. For example, context.Orders.Include(o => o.Customer).ToList();
سؤال 14. What is the purpose of the AsNoTracking method in Entity Framework?
The AsNoTracking method is used to disable change tracking for a specific query, which can improve performance when you only need to read data.
سؤال 15. Explain the purpose of the EntityState enumeration in Entity Framework.
EntityState is an enumeration that represents the state of an entity being tracked by the DbContext. It can be used to determine whether an entity is new, modified, or deleted.
الاكثر فائدة حسب تقييم المستخدمين: