using System.Linq.Expressions; namespace Finch.Numbers; public interface IFinchNumberStoreDbProvider { Task Load(string id, CancellationToken ct = default) where T : FinchEntity, new(); Task Find(Expression> expression, CancellationToken ct = default) where T : FinchEntity; Task> FindAll(Expression> expression, CancellationToken ct = default) where T : FinchEntity; Task> Create(T model, CancellationToken ct = default) where T : FinchEntity, new(); Task> Update(T model, CancellationToken ct = default) where T : FinchEntity, new(); Task> Delete(T model, CancellationToken ct = default) where T : FinchEntity, new(); } public class EmptyFinchNumberStoreDbProvider : IFinchNumberStoreDbProvider { public Task> Create(T model, CancellationToken ct = default) where T : FinchEntity, new() { throw new NotImplementedException(); } public Task> Delete(T model, CancellationToken ct = default) where T : FinchEntity, new() { throw new NotImplementedException(); } public Task Find(Expression> expression, CancellationToken ct = default) where T : FinchEntity { throw new NotImplementedException(); } public Task> FindAll(Expression> expression, CancellationToken ct = default) where T : FinchEntity { throw new NotImplementedException(); } public Task Load(string id, CancellationToken ct = default) where T : FinchEntity, new() { throw new NotImplementedException(); } public Task> Update(T model, CancellationToken ct = default) where T : FinchEntity, new() { throw new NotImplementedException(); } }