tugberkugurlu / AspNetCore.Identity.MongoDB

MongoDB Data Store Adaptor for ASP.NET Core Identity
MIT License
229 stars 69 forks source link

implement IQueryableUserStore<TUser> #44

Closed SorenZ closed 6 years ago

SorenZ commented 7 years ago
  1. NotSupportedException: Store does not implement IQueryableUserStore<TUser> In case when we want to query on users through Store (UserManager) and get information about users

  2. auto-property accessor has conflict with MongoIdentityUserexpansions by inheritance to new Model in my scenario I have a model that inherit from MongoIdentityUser

public class User : MongoIdentityUser, IEntity
    {
        //public new string Id { get; set; }

        public User(string userName, string email) : base(userName, email)
        {

        }

        public User(string userName, AspNetCore.Identity.MongoDB.Models.MongoUserEmail email) : base(userName, email)
        {

        }

        public User(string userName) : base(userName)
        {

        }

        // Our Customs Fields
        public string NationalCode { get; set; }
       .
       .
}

I need to have public setter access to Id property. I didn't want to create a PR for two different subject but GitHub merge it.

tugberkugurlu commented 7 years ago

I need to have public setter access to Id property.

why?

SorenZ commented 7 years ago

In my case IEntity have Id property with public getter and setter (its standard in my framework) Maybe I was wrong and should change IEntity.

tugberkugurlu commented 7 years ago

The changes here should be just around MongoUserStore and some tests for that.

SorenZ commented 7 years ago

@tugberkugurlu I've changed back MongoUserStore , and try to solve my problem with parameterized constructors.

tugberkugurlu commented 7 years ago

Could you also add some tests around this?

SorenZ commented 7 years ago

@tugberkugurlu Of course. I watched carefully you build test projects and infra for in place testing. I love to complete testing project, I had busy days but I will work on testing in near future. just like main AspNet/Identity test project.

tugberkugurlu commented 7 years ago

@SorenZ 👋 any updates on the tests for this to highlight what works and what does not?

tugberkugurlu commented 6 years ago

@SorenZ 👋 any updates on the tests for this to highlight what works and what does not?

Hi @SorenZ 👋 I will close this for now as we are try to get this back up and this PR is a bit behind. Feel free to reopen, add tests and we can think about getting this working again 👍 /cc @dealproc