Renamed model repo to provider + provider registration check

This commit is contained in:
2024-11-23 15:29:46 +01:00
parent beac2aa20c
commit f8995ca990
12 changed files with 31 additions and 29 deletions

View File

@@ -78,11 +78,11 @@ public interface IAdminPageGenerator<TModel> {
IAdminPageGenerator<TModel> DefaultSort<TProperty>(Expression<Func<TModel, TProperty>> propertyExpression, ListSortDirection direction);
/// <summary>
/// Specifies the repository for the page
/// Specifies the repository provider for the page
/// </summary>
/// <typeparam name="TRepository">The specified repository</typeparam>
/// <typeparam name="TRepository">The specified provider</typeparam>
/// <returns></returns>
IAdminPageGenerator<TModel> ConfigureRepository<TRepository>() where TRepository : ModelRepository<TModel>;
IAdminPageGenerator<TModel> ConfigureProvider<TRepository>() where TRepository : ModelProvider<TModel>;
/// <summary>

View File

@@ -91,7 +91,7 @@ internal sealed class AdminPageGenerator<TModel> : IAdminPageGenerator<TModel>,
return this;
}
public IAdminPageGenerator<TModel> ConfigureRepository<TRepository>() where TRepository : ModelRepository<TModel> {
public IAdminPageGenerator<TModel> ConfigureProvider<TRepository>() where TRepository : ModelProvider<TModel> {
Page.RepositoryProvider = typeof(TRepository);
return this;
}