Hi,
I’m converting my project to code-first, so based on .rodl I had the server-side interfaces and to call a method from another service (example below), now, how do I do this using code-first model?
function TFirstService.GetServerTime: DateTime;
var
cf: IROClassFactory;
instance: IInterface;
objactivation:IROObjectActivation;
begin
cf:=GetClassFactory(‘SecondService’);
cf.CreateInstance(ClientID, instance);
if Supports(instance, IROObjectActivation, objactivation) then
begin
objactivation.OnActivate(ClientID, nil);
end;
Result := (instance as ISecondService).GetServerTime();
if Supports(instance, IROObjectActivation, objactivation) then
begin
objactivation.OnDeactivate(ClientId);
end;
instance := nil;
end;
Best Rergads,