The item with identity 'Id' already exists in the metadata collection. Parameter name: item
All of my entities have a base class: public class Entity<TKey> : IEntity<TKey> { dynamic IEntity.Id { get { return this.Id; } set { this.Id = value; } } public TKey Id { get; set; } } For example Status entity: [MetadataType(typeof(StatusMetadata))] public partial class Status : Entity<byte> { public string Title { get; set; } } When I run the query against the database I get the following error: "The item with identity 'Id' already exists in the metadata collection. Parameter name: item". Is there any way to fix this or it's an issue caused by inheritance and I can't inherit my entities from