Need Advice on Entity Manager
Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2012
Forum Discription: For .NET 4.5
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=4686
Printed Date: 26-Apr-2025 at 9:36am
Topic: Need Advice on Entity Manager
Posted By: BillG
Subject: Need Advice on Entity Manager
Date Posted: 24-Apr-2014 at 9:23am
I open up a Member form for Add/Editing members. It has its own entity manager and when the Save button is clicked I close the form and go back to a list form.
When the save is processed, I call a routine called CalculateOwing which calculates the members balance. This method is in a separate .cs file cause it can be called from many areas in the application.
Should the CalculateOwing method be in a separate entity manager or in the same entity manager as the member record being processed?
|
Replies:
Posted By: jbiddle61
Date Posted: 25-Apr-2014 at 9:47am
If you want the results of CalculateOwing to be part of the same
database transaction, you need to call it before the Save completes and
on the same EntityManager that the Save is using.
|
|