Using a data type is a detail of the implementation of the Entity Framework implementation. Other connectors (for example, for MongoDB) use different data types. You can write your own implementation for this, but from the second version of Identity you can use other types for your identifiers (there is no need to use VARCHAR or strings). To get this working, you need to implement some additional classes that derive from some framework classes.
For an example implementation, consider James's answer in this thread . With this code snippet, you just need to change the generic type from int to Guid in order to get Guides as the data type for identifiers.
source share