Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Supporting any IDbSet<> implementations #159
Currently, restier does not support IDbSet<> implementations other than DbSet<>. So, if one implements a custom IDbSet<> implementation, or even extends the default implementation, DbSet<>, he/she would not be able to use it with RESTier. Because, as far as i know by inspecting the ModelMapper implementation, any IDbSet<> implementation not being DbSet<> is rejected.
For example, when using IdentityDbContext, because it defines the entity sets as IDbSet<>, i have not be able to work it with Restier.
To overcome this problem, i created my custom IModelMapper by just copying the default one, and adding the changes i included in this commit. Currently i am using this implementation and I don't know if there is any reason for this constraint in the default implementation. So, instead of asking you if this is a proper solution, and explaining what i did in details, i decided to make a pull request.
If it may lead any problems with the rest of the framework, please let me know about it. Because, as i said, currently i use this implementation with my custom IModelMapper implementation which i created just to overcome this problem.
Hi @mkemal, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
I had copied the changes from my custom implementation. Because i didn't even open the project in VS, I had never compiled it before submitting. So, i had forgotten to include 'Linq' namespace import. Sorry for that.
Here are the changes i included in the new commit: