1234567891011121314151617181920 |
-
- namespace XGame.Framework.Database
- {
- public interface IDatabaseModule
- {
- TTable GetByKey<TTable, TRepository>(long key) where TTable : class, ITable where TRepository : TableRepository<TTable, TRepository>;
- /// <summary>
- /// 根据索引取值
- /// index == -1 表示取最后一个
- /// </summary>
- /// <typeparam name="TTable"></typeparam>
- /// <typeparam name="TRepository"></typeparam>
- /// <param name="index"></param>
- /// <returns></returns>
- TTable GetByIndex<TTable, TRepository>(int index) where TTable : class, ITable where TRepository : TableRepository<TTable, TRepository>;
- TTable[] GetAll<TTable, TRepository>() where TTable : class, ITable where TRepository : TableRepository<TTable, TRepository>;
- IDatabaseAsync<TTable> LoadAsync<TTable, TRepository>(string tableName) where TTable : class, ITable where TRepository : TableRepository<TTable, TRepository>;
- void Unload(string tableName);
- }
- }
|