New Posts New Posts RSS Feed: Need Advice on Entity Manager
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Need Advice on Entity Manager

 Post Reply Post Reply
Author
BillG View Drop Down
DevForce MVP
DevForce MVP
Avatar

Joined: 05-Dec-2007
Location: Monroe, MI
Posts: 233
Post Options Post Options   Quote BillG Quote  Post ReplyReply Direct Link To This Post Topic: Need Advice on Entity Manager
    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?
Back to Top
jbiddle61 View Drop Down
Newbie
Newbie


Joined: 18-Dec-2012
Location: Arizona
Posts: 24
Post Options Post Options   Quote jbiddle61 Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down