delphimvcframework/samples/spring4dintegration/Service2U.pas

30 lines
534 B
ObjectPascal
Raw Normal View History

2017-10-16 22:57:27 +02:00
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.