-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] About IStorageContext #97
Comments
Yes, I've found this issue too today. I think, that was not so good idea and I should fix it in beta3. The reason I did it is here: https://github.com/ExtCore/ExtCore/blob/master/src/ExtCore.Data.EntityFramework/RepositoryBase.cs#L25 When I had Now I don't know what to do. Whether I have to make I don't think we should add some members to the What do you think? |
Perhaps, we should add some additional member to the EF implementation of the repository. Like,
So we will have both So maybe the extension method that will cast IStorageContext to DbContext is the best solution? |
...So, after some research, I think the best way would be to modify
This seems to be logical to have EF DbContext object inside the EF repositories without any casts. And you still have to provide the implementation of the IStorageContext interface. I'm going to fix this tomorrow if you don't have any comments regarding this. |
Thanks for the research, it sounds very good like this, it is consistent ! |
Thank you. I will quickly update and remove all the cast that we had put. |
Hi Dmitry,
After your changes in #96, I had to modify some of my own code with additional cast here and many ugly casts :-) here
Thus a question, why not adding
.Entry(T)
and.Set<T>
to IStorageContext interface? These methods seem agnostic enough to be added to interface, although they come from Entity Framework first.The text was updated successfully, but these errors were encountered: