Implementation of repositories and return infos

This commit is contained in:
Sébastien André
2019-09-26 15:31:17 +02:00
parent 4d6787af20
commit ed3f7c42c5
34 changed files with 1382 additions and 8 deletions

View File

@@ -1,12 +1,44 @@
using skydiveLogs_api.Business.Interface;
using skydiveLogs_api.Model;
using System;
using System.Collections.Generic;
using System.Text;
using skydiveLogs_api.Data.Interface;
namespace skydiveLogs_api.Business
{
public class AircraftService : IAircraftService
{
public AircraftService(IAircraftRepository aircraftRepository)
{
_aircraftRepository = aircraftRepository;
}
public void AddNewAircraft(Aircraft aircraft)
{
throw new NotImplementedException();
}
public void DeleteAircraftById(int id)
{
throw new NotImplementedException();
}
public Aircraft GetAircraftById(int id)
{
throw new NotImplementedException();
}
public IEnumerable<Aircraft> GetAllAircrafts()
{
return _aircraftRepository.GetAllAircrafts();
}
public void UpdateAircraft(int id, Aircraft aircraft)
{
throw new NotImplementedException();
}
private readonly IAircraftRepository _aircraftRepository;
}
}

View File

@@ -2,10 +2,43 @@
using System.Collections.Generic;
using System.Text;
using skydiveLogs_api.Business.Interface;
using skydiveLogs_api.Data.Interface;
using skydiveLogs_api.Model;
namespace skydiveLogs_api.Business
{
public class DropZoneService : IDropZoneService
{
public DropZoneService(IDropZoneRepository dropZoneRepository)
{
_dropZoneRepository = dropZoneRepository;
}
public void AddNewDz(DropZone dropZone)
{
throw new NotImplementedException();
}
public void DeleteDzById(int id)
{
throw new NotImplementedException();
}
public IEnumerable<DropZone> GetAllDzs()
{
return _dropZoneRepository.GetAllDzs();
}
public DropZone GetDzById(int id)
{
throw new NotImplementedException();
}
public void UpdateDz(int id, DropZone dropZone)
{
throw new NotImplementedException();
}
private readonly IDropZoneRepository _dropZoneRepository;
}
}

View File

@@ -2,10 +2,43 @@
using System.Collections.Generic;
using System.Text;
using skydiveLogs_api.Business.Interface;
using skydiveLogs_api.Model;
using skydiveLogs_api.Data.Interface;
namespace skydiveLogs_api.Business
{
public class JumpService : IJumpService
{
public JumpService(IJumpRepository jumpRepository)
{
_jumpRepository = jumpRepository;
}
public void AddNewJump(Jump jump)
{
throw new NotImplementedException();
}
public void DeleteJumpById(int id)
{
throw new NotImplementedException();
}
public IEnumerable<Jump> GetAllJumps()
{
return _jumpRepository.GetAllJumps();
}
public Jump GetJumpById(int id)
{
throw new NotImplementedException();
}
public void UpdateJump(int id, Jump jump)
{
throw new NotImplementedException();
}
private readonly IJumpRepository _jumpRepository;
}
}

View File

@@ -1,11 +1,44 @@
using skydiveLogs_api.Business.Interface;
using skydiveLogs_api.Model;
using System;
using System.Collections.Generic;
using System.Text;
using skydiveLogs_api.Data.Interface;
namespace skydiveLogs_api.Business
{
public class JumpTypeService : IJumpTypeService
{
public JumpTypeService(IJumpTypeRepository jumpTypeRepository)
{
_jumpTypeRepository = jumpTypeRepository;
}
public void AddNewJumpType(JumpType value)
{
throw new NotImplementedException();
}
public void DeleteJumpTypeById(int id)
{
throw new NotImplementedException();
}
public IEnumerable<JumpType> GetAllJumpTypes()
{
return _jumpTypeRepository.GetAllJumpTypes();
}
public JumpType GetJumpTypeById(int id)
{
throw new NotImplementedException();
}
public void UpdateJumpType(int id, JumpType value)
{
throw new NotImplementedException();
}
private readonly IJumpTypeRepository _jumpTypeRepository;
}
}