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.
WF-PmAPI/WF_EF_Api/Shared/ICharacterService.cs

42 lines
1.5 KiB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Shared
{
public interface ICharacterService<TChar>
{
// Retrieves a character by its unique identifier (id).
// 'id' is the unique identifier of the character.
Task<TChar> GetCharById(int id);
// Retrieves a character by its name.
// 'name' is the name of the character to be retrieved.
Task<TChar> GetCharByName(string name);
// Retrieves all characters, with pagination support.
// This returns a list of all characters in the system.
Task<PaginationResult<TChar>> GetAll();
// Adds a new character to the system.
// 'character' is the character object that will be added to the system.
Task AddCharacter(TChar character);
// Updates an existing character identified by its unique identifier ('id').
// 'id' is the unique identifier of the character to be updated
// 'character' contains the updated character data.
Task UpdateCharacter(int id, TChar character);
// Removes a character from the system based on its unique identifier ('id').
// 'id' is the unique identifier of the character to be removed.
Task RemoveCharacter(int id);
// Retrieves the unique identifier of the last added character.
Task<int> GetLastCharId();
Task<PaginationResult<TChar>> GetSomeChar(int page, int count);
}
}