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