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,31 @@
using PartSource.Entities.Nexpart;
using PartSource.Services;
using System.Threading.Tasks;
using System.Web.Http;
namespace PartSource.Controllers
{
[RoutePrefix("search")]
public class SearchController : BaseNexpartController
{
private readonly NexpartService _nexpartService;
public SearchController()
{
this._nexpartService = new NexpartService();
}
[HttpGet]
[Route("makes/vehicletypeid/{vehicleTypeId}")]
public async Task<IHttpActionResult> GetMakes(uint vehicleTypeId)
{
SearchController searchController = this;
MakeSearch requestContent = new MakeSearch()
{
VehicleTypeId = new uint[1] { vehicleTypeId }
};
MakeSearchResponse response = await searchController._nexpartService.SendRequest<MakeSearch, MakeSearchResponse>(requestContent);
return searchController.NexpartResponse<MakeSearchResponse, Makes>(response);
}
}
}