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

29 lines
504 B
ObjectPascal

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