I'm sure that I'm just missing something obvious but I can't seem to get the following code to function correctly.
This is one of my POCO classes that uses a Guid:
public class Player
{
public virtual Guid PlayerID { get; set; }
public virtual int? GuildID { get; set; }
public virtual int AccountNumber { get; set; }
public virtual string UserName { get; set; }
public virtual Guild Guild { get; set; }
public virtual ICollection<Coordinate> Coordinates { get; set; }
}
It is linked to it's own configuration class using the Fluent API:
public class PlayerConfiguration : EntityTypeConfiguration<Player>
{
public PlayerConfiguration()
{
ToTable("Players", "ACDB");
Property(p => p.PlayerID)
.HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);
Property(p => p.UserName).HasMaxLength(25);
}
}
The configuration is then registered with the DbContext.
The error I'm getting is the following: Incorrect column specifier for column 'PlayerID'
Any ideas on where I'm going wrong?