mirror of
https://github.com/danieleteti/delphimvcframework.git
synced 2024-11-18 01:05:54 +01:00
33 lines
515 B
ObjectPascal
33 lines
515 B
ObjectPascal
unit SampleControllerU;
|
|
|
|
interface
|
|
|
|
uses
|
|
MVCFramework, MVCFramework.Commons;
|
|
|
|
type
|
|
|
|
[MVCPath('/')]
|
|
TSampleController = class(TMVCController)
|
|
public
|
|
[MVCHTTPMethod([httpPost])]
|
|
[MVCPath('/customers')]
|
|
[MVCProduces('text/html')]
|
|
procedure CreateCustomer(CTX: TWebContext);
|
|
|
|
end;
|
|
|
|
implementation
|
|
|
|
uses
|
|
System.SysUtils;
|
|
|
|
{ TRoutingSampleController }
|
|
|
|
procedure TSampleController.CreateCustomer(CTX: TWebContext);
|
|
begin
|
|
LoadView('customer_show');
|
|
end;
|
|
|
|
end.
|