using System.Collections.Generic;
using System.Threading.Tasks;
namespace Shared;
///
/// Generic object interface containing CRUD methods
///
/// Generic Object
public interface IDataServices
{
///
/// Get a list of data, filtered or not, and paginated results
///
/// An Enumerable of generic object
public Task> GetList();
///
/// Get an object based on its identifier
///
/// Identifier (Guid.ToString())
/// The object or null if the id is incorrect
public Task GetDataById(string id);
///
/// Add an object to the database
///
/// Object to add
/// The object added
public Task CreateData(TObject data);
///
/// Modify an object in the database
///
/// Object to modify
/// Identifier (Guid.ToString())
/// The object modified
public Task UpdateData(TObject data, string id);
///
/// Delete an object from the database
///
/// Identifier (Guid.ToString())
/// true if the object has been deleted, false otherwise
public Task DeleteById(string id);
}