System.InvalidOperationException: No mapping to a relational type can be found for property with the CLR type 'Guid' mysql
I am having difficulty when trying to use a Guid as a primary key on an entity in Entity Framework Core 1.0 using the latest MySQL Connector and EF Core MySQL provider.
public class Person
{
[Key]
public Guid PersonId { get; set; }
[Required]
[MaxLength(25)]
public string FirstName { get; set; }
[Required]
[MaxLength(25)]
public string LastName { get; set; }
}
When I attempt to create the database using EF Migrations, I get the following error.
Applying migration '20170507161040_InitialCreate'.
System.InvalidOperationException: No mapping to a relational type can be found for property 'ClassLib.Person.PersonId' with the CLR type 'Guid'.
Someone else had already reported this issue back in January, and the person was told that the functionality had not yet been implemented but was in progress.
https://forums.mysql.com/read.php?38,653992,653992
Guid-based primary keys are extremely common (and arguably necessary) in many projects.
Is there any idea when Guids may be supported?