This repository has been archived on 2025-05-19. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
novaloop.paymoapi/src/Shared/IBaseApi.cs

42 lines
1.2 KiB
C#

using System.Dynamic;
using System.Threading.Tasks;
namespace Novaloop.PaymoApi.Shared
{
public interface IBaseApi<TReturnType, TCreatType>
{
string ResourceUri { get; set; }
/// <summary>
/// Receive all entities
/// </summary>
Task<TReturnType> GetAll();
/// <summary>
/// Retrieve an existing entity
/// </summary>
/// <param name="entityId">id of the entity</param>
/// <returns></returns>
Task<TReturnType> Get(int entityId);
/// <summary>
/// Create a new entity
/// </summary>
Task<TReturnType> Create( TCreatType entity);
/// <summary>
/// Delete an entity
/// </summary>
/// <param name="entityId">id of the entity</param>
/// <returns></returns>
Task Delete(int entityId);
/// <summary>
/// Update an entity
/// </summary>
/// <param name="entity">entity information to update the entity with</param>
/// <param name="id">id of the entity to update</param>
/// <returns></returns>
Task Update(ExpandoObject entity, int id);
}
}