Add "Image" context to add images for the users
This commit is contained in:
45
Back/skydiveLogs-api.Business/ImageService.cs
Normal file
45
Back/skydiveLogs-api.Business/ImageService.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user