25 lines
600 B
C#
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);
|
|
|
|
}
|
|
}
|