This repository has been archived on 2025-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
BreCal/src/brecal.model/IDBManager.cs

25 lines
600 B
C#

using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace brecal.model
{
public interface IDBManager
{
delegate List<DbEntity> LoadFunc<T>(T entity);
delegate void QueryFunc(IDbCommand cmd, params object?[] args);
Task<List<DbEntity>> Load(QueryFunc prepareAction, LoadFunc<IDataReader> loadAction, params object?[] args);
Task<object?> ExecuteScalar(Action<IDbCommand> prepareAction);
Task<int> ExecuteNonQuery(Action<IDbCommand> prepareAction);
}
}