52 lines
1.3 KiB
C#
52 lines
1.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
|
|
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.GetAll();
|
|
}
|
|
|
|
public DropZone GetDzById(int id)
|
|
{
|
|
return _dropZoneRepository.GetById(id);
|
|
}
|
|
|
|
public bool UpdateDz(int id, DropZone dropZone)
|
|
{
|
|
dropZone.Id = id;
|
|
|
|
//dropZone.Address = dropZone.Address ?? string.Empty;
|
|
//dropZone.Website = dropZone.Address ?? string.Empty;
|
|
//dropZone.Email = dropZone.Address ?? string.Empty;
|
|
|
|
return _dropZoneRepository.Update(dropZone);
|
|
}
|
|
|
|
private readonly IDropZoneRepository _dropZoneRepository;
|
|
}
|
|
}
|