To access the current context in a service implementation we have the TXDATAOperationContext object which make life easy.
If I have a TXDataServer Event, let's say OnModifying. where should I get the current context from, so I can access teh ObjectManager for example?
In this case I have an object that is called from the event, along the lines of:
procedure TServerContainer.XDataServerEntityModifying(Sender: TObject; Args: TEntityModifyingArgs);
var
lMyObject: IMyObject;
begin
lMyObject := TMyObject.Create(Args.Entity, Args);
lMyObject.DoSomething;
end;
Would TXDATAOperationContext be available within the object as it is within a service method?
Thanks