iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
We've posted a similar question before (click here), but this approach is unstable. The first time an entity is being saved, the navigation properties should already contain the calculated data based on triggers. We have to send another save request from the client-side in order to get the updated values for the navigation properties. This is terrible, we can;t send multiple requests just to get the updated values. This leads us to refresh data from client-side by using GetSingleAsync() method from the repository, but we're getting errors using commposite keys (see here). Still this seems like multiple round trips from client-side to the server (after saving > refresh data).
Please advise! Thanks!
Hi Jimmy,
For your information, Entity Framework works best when database leaves all the logic to the Entity Framework code. In a case where your database trigger was complex and required more time, you could adopt one of below options:
1. Let Entity Framework to handle all complex trigger logic.2. Make client side to reload the entity after save was done. (I believe that hotfix for GetSingleAsync issue will be available soon)3. If you know the estimated time the trigger process will finish, you could wait several second before reload the data.
About disposing the DbContext and create a new one, may be you could create the new DbContext while leaving the original one then get the required data from the new context.
Best Regards,Leo
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname