You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.5 KiB
40 lines
1.5 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Shared
|
|
{
|
|
public interface IImagesService<TImage>
|
|
{
|
|
// Retrieves an image by its unique identifier (id).
|
|
// 'id' is the unique identifier of the image.
|
|
Task<TImage> GetImageById(int id);
|
|
|
|
// Retrieves all images, with pagination support.
|
|
// This returns a list of all images in the system.
|
|
Task<PaginationResult<TImage>> GetAllImage();
|
|
|
|
// Retrieves a subset of images based on the provided index and page size.
|
|
// 'index' is the starting point for pagination (page number).
|
|
// 'pageSize' is the number of images per page.
|
|
Task<PaginationResult<TImage>> GetSomeImage(int index, int pageSize);
|
|
|
|
// Adds a new image to the system.
|
|
// 'image' is the image object that will be added to the system.
|
|
Task AddImage(TImage image);
|
|
|
|
// Updates an existing image identified by its unique identifier ('id').
|
|
// 'id' is the unique identifier of the image to be updated, and 'image' contains the updated image data.
|
|
Task UpdateImage(int id, TImage image);
|
|
|
|
// Removes an image from the system based on its unique identifier ('id').
|
|
// 'id' is the unique identifier of the image to be removed from the system.
|
|
Task RemoveImage(int id);
|
|
|
|
// Retrieves the last Image ID.
|
|
Task<int> GetLastImageId();
|
|
}
|
|
}
|