-
Notifications
You must be signed in to change notification settings - Fork 271
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
Please help : Inserted item ID not populated #35
Comments
Your title needs some work; I assume the actual issue is "Inserted item ID not populated"? You may need to move the last two lines out of the using block; closing the connection to the database should complete the transaction. Otherwise, Context.Entry(address).Reload() might work. |
Sorry, but It doesn't working... But in this case with DbContextScope SaveChages() Do anything when the are parent scope. |
Finally,
|
You can overcome this issue by calling SaveChanges from the DbContext (not the DbContextScope) in your implementation of _clientRepository.Add |
Hi,
Recently I found your DbContextScope, and I find project very interesting.
I wanted to test it but I encounter some issue.
Explanation :
BUSINESS LAYER:
"ClientManager"
"AddressManager"
I have my console program for test and it's works fine.
But now if I want to add to "ClientManager" another function:
It's not working because my client ID is auto-increment integer in database and it's not initialized because of DbContextScope.SaveChanges
How I can resolve this issue with your framework?
Thanks you in advance
P.S
Sorry for my English :)
The text was updated successfully, but these errors were encountered: