April 2017
Intermediate to advanced
564 pages
24h 7m
English
Next, we will add a controller, which will derive from our custom BaseController class.
The following is the code of ServiceRequestController, which contains an HTTP POST method to save the service requests of the tenant:
[LoggingActionFilter] [Route("api/[controller]")] public class ServiceRequestController : BaseController { IServiceRequestManager _manager; ILogger<ServiceRequestController> _logger; public ServiceRequestController(IServiceRequestManager manager, ILogger<ServiceRequestController> logger) : base(manager, logger) { _manager = manager; _logger = logger; } [HttpGet] public IEnumerable<TenantServiceRequest> GetTenantsRequests() { return _manager.GetAllTenantServiceRequests(); } [TransactionActionFilter()] ...Read now
Unlock full access