Fix IoC
This commit is contained in:
@@ -1,18 +1,17 @@
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using AutoMapper;
|
||||
using Microsoft.AspNetCore.Cors;
|
||||
|
||||
using AutoMapper;
|
||||
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using skydiveLogs_api.DataContract;
|
||||
using skydiveLogs_api.Domain;
|
||||
using skydiveLogs_api.DomainBusiness.Interfaces;
|
||||
using skydiveLogs_api.DataContract;
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace skydiveLogs_api.Controllers
|
||||
{
|
||||
public class AircraftController : Base
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
public AircraftController(IAircraftService aircraftService,
|
||||
IMapper mapper)
|
||||
{
|
||||
@@ -20,6 +19,18 @@ namespace skydiveLogs_api.Controllers
|
||||
_mapper = mapper;
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Public Methods
|
||||
|
||||
// DELETE: api/ApiWithActions/5
|
||||
[HttpDelete("{id}")]
|
||||
[EnableCors]
|
||||
public void Delete(int id)
|
||||
{
|
||||
_aircraftService.DeleteAircraftById(id);
|
||||
}
|
||||
|
||||
// GET: api/Aircraft
|
||||
[HttpGet]
|
||||
[EnableCors]
|
||||
@@ -54,15 +65,13 @@ namespace skydiveLogs_api.Controllers
|
||||
_aircraftService.UpdateAircraft(id, _mapper.Map<Aircraft>(value));
|
||||
}
|
||||
|
||||
// DELETE: api/ApiWithActions/5
|
||||
[HttpDelete("{id}")]
|
||||
[EnableCors]
|
||||
public void Delete(int id)
|
||||
{
|
||||
_aircraftService.DeleteAircraftById(id);
|
||||
}
|
||||
#endregion Public Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private readonly IAircraftService _aircraftService;
|
||||
private readonly IMapper _mapper;
|
||||
|
||||
#endregion Private Fields
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user