You really don't even need all of the attributes you put in there.
EF follows a convention that if there is a property in the class that is either called "Id" or that matches the class name with "Id" appended to it, that property is automatically the primary [Key].
You don't even need all the other stuff unless you're going to make some non-standard key in the database. An auto-incrementing int is the default. If you make something different, then you can start throwing attributes at the code, or skip the attributes and do it through the Fluent configuration.
In your example, all you need is this:
public class Batch
{
public Batch()
{
this.SubBatches = new HashSet<SubBatch>();
}
public int BatchID { get; set; }
public string Name { get; set; }
public virtual ICollection<SubBatch> SubBatches { get; set; }
}
Oh, and it also helps to initialize the collection...