delphimvcframework/samples/spring4dintegration/Service2U.pas
Daniele Teti a8d57bb78b RC10
2017-10-16 22:57:49 +02:00

30 lines
534 B
ObjectPascal

unit Service2U;
interface
uses
ServicesInterfaceU, Spring.Container.Common;
type
TCustomersService = class(TInterfacedObject, ICustomersService)
protected
[Inject]
fCommonService: ICommonService;
public
function GetCustomerNameByID(const ID: Integer): string;
end;
implementation
uses
System.SysUtils;
{ TCustomersService }
function TCustomersService.GetCustomerNameByID(const ID: Integer): string;
begin
Result := Format('Customer #%d (CommonServiceID = %s)', [ID, fCommonService.GetID]);
end;
end.