Initial commit

This commit is contained in:
2020-04-12 20:52:03 -04:00
parent e750d2848a
commit 01e7627293
249 changed files with 9733 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
using Microsoft.AspNetCore.Mvc;
using PartSource.Data.Nexpart;
using PartSource.Services;
using System.Threading.Tasks;
namespace PartSource.Api.Controllers
{
[Route("[controller]")]
[ApiController]
public class SearchController : BaseNexpartController
{
private readonly NexpartService _nexpartService;
public SearchController()
{
this._nexpartService = new NexpartService();
}
[HttpGet]
[Route("makes/vehicletypeid/{vehicleTypeId}")]
public async Task<ActionResult> GetMakes(int vehicleTypeId)
{
SearchController searchController = this;
MakeSearch requestContent = new MakeSearch()
{
VehicleTypeId = new int[] { vehicleTypeId }
};
MakeSearchResponse response = await searchController._nexpartService.SendRequest<MakeSearch, MakeSearchResponse>(requestContent);
return searchController.NexpartResponse<MakeSearchResponse, Makes>(response);
}
}
}