Add "Image" context to add images for the users

This commit is contained in:
Sébastien André
2020-05-26 17:26:04 +02:00
parent 8367927046
commit f21bda7d7b
18 changed files with 250 additions and 10 deletions

View File

@@ -0,0 +1,45 @@
using System;
using System.Collections.Generic;
using skydiveLogs_api.Business.Interface;
using skydiveLogs_api.Model;
using skydiveLogs_api.Data.Interface;
namespace skydiveLogs_api.Business
{
public class ImageService : IImageService
{
public ImageService(IImageRepository imageRepository)
{
_imageRepository = imageRepository;
}
public void AddNewImage(Image newImage)
{
_imageRepository.Add(newImage);
}
public void DeleteImageById(int id)
{
throw new NotImplementedException();
}
public Image GetImageById(int id)
{
return _imageRepository.GetById(id);
}
public IEnumerable<Image> GetAllImages()
{
return _imageRepository.GetAll();
}
public void UpdateImage(int id, Image Image)
{
throw new NotImplementedException();
}
private readonly IImageRepository _imageRepository;
}
}