I would like to extend User class in Orchard Core (Orchard 2), add some additional properties like FirstName, LastName for example. I understand I can store such information in a separate entity like UserProfile, but sometimes it would be convenient just to use my own implementation of IUser. It looks like OrchardCore implementation of "Membership system" is coupled to Orchard.Users.Models.User type. I see there is a service
IUserService.CreateUserAsync(User user,...
Probably it would be better to use IUser interface instead of Orchard.Users.Models.User type? I tried to inherit from Orchard.Users.Models.User class like
class MyUser : Orchard.Users.Models.User
{
..
}
But when I tried to invoke IUserService.CreateUserAsync(myUser) I got a Error
`Unable to cast object of type 'YesSql.Indexes.DescribeContext`1[MyTestModule.Abstractions.Models.MyUser]' to type 'YesSql.Indexes.DescribeContext`1[Orchard.Users.Models.User]'.`
Since Orchard Core use Document storage DB, Why I can not just create my own implementation of IUser and use it? Will it be fixed in the future? may be some workarounds for now?