Questions et réponses d'entretien les plus demandées et tests en ligne
Plateforme d'apprentissage pour la preparation aux entretiens, les tests en ligne, les tutoriels et la pratique en direct

Developpez vos competences grace a des parcours cibles, des tests blancs et un contenu pret pour l'entretien.

WithoutBook rassemble des questions d'entretien par sujet, des tests pratiques en ligne, des tutoriels et des guides de comparaison dans un espace d'apprentissage reactif.

Preparation a l'entretien

Entity Framework Questions et reponses d'entretien

Question 21. Explain the purpose of the [Key] attribute in Entity Framework.

The [Key] attribute is used to specify the primary key property of an entity when it does not match the default convention.

Example:

[Key] public int MyCustomId { get; set; }

Est-ce utile ? Ajouter un commentaire Voir les commentaires
 

Question 22. What is the purpose of the [ConcurrencyCheck] attribute in Entity Framework?

The [ConcurrencyCheck] attribute is used to specify that a property should be included in the WHERE clause of an UPDATE or DELETE statement to check for concurrency conflicts.

Example:

[ConcurrencyCheck] public byte[] RowVersion { get; set; }

Est-ce utile ? Ajouter un commentaire Voir les commentaires
 

Question 23. Explain the purpose of the [NotMapped] attribute in Entity Framework.

The [NotMapped] attribute is used to specify that a property should not be mapped to a column in the database.

Example:

[NotMapped] public string CalculatedProperty { get { /* calculation logic */ } }

Est-ce utile ? Ajouter un commentaire Voir les commentaires
 

Question 24. What is the purpose of the DbSet.Find method in Entity Framework?

The DbSet.Find method is used to retrieve an entity from the database by its primary key value.

Example:

var entity = context.MyEntities.Find(1);

Est-ce utile ? Ajouter un commentaire Voir les commentaires
 

Question 25. Explain the purpose of the IDbSet interface in Entity Framework.

The IDbSet interface is an interface that represents a collection of entities in the context. It is implemented by DbSet.

Est-ce utile ? Ajouter un commentaire Voir les commentaires
 

Les plus utiles selon les utilisateurs :

Copyright © 2026, WithoutBook.