Define the ISomeInterface interface with the Id field, for example:
public interface ISomeInterface { int Id { get; } }
And then you can make your abstract class implement this interface, and also add a general constraint that requires T be an implementation of this interface, for example:
public abstract class ItemDataService<T> : ISomeInterface where T : ISomeInterface { public int Id { get; set; }
EDIT
Actually, given your interesting inheritance tree, you don't need an interface at all. You can simply add a generic constraint that forces T be a child of ItemDataService<T> . It looks funny, but it works:
public abstract class ItemDataService<T> where T : ItemDataService<T> { public int Id { get; set; }
sstan source share