mirror of
https://github.com/danieleteti/delphimvcframework.git
synced 2024-11-15 15:55:54 +01:00
30 lines
534 B
ObjectPascal
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.
|