Files
TechHelper/Entities/Context/UnitOfWork/IRepositoryFactory.cs
2025-05-23 19:03:00 +08:00

21 lines
789 B
C#

using System;
using System.Collections.Generic;
using System.Text;
namespace SharedDATA.Api
{
/// <summary>
/// Defines the interfaces for <see cref="IRepository{TEntity}"/> interfaces.
/// </summary>
public interface IRepositoryFactory
{
/// <summary>
/// Gets the specified repository for the <typeparamref name="TEntity"/>.
/// </summary>
/// <param name="hasCustomRepository"><c>True</c> if providing custom repositry</param>
/// <typeparam name="TEntity">The type of the entity.</typeparam>
/// <returns>An instance of type inherited from <see cref="IRepository{TEntity}"/> interface.</returns>
IRepository<TEntity> GetRepository<TEntity>(bool hasCustomRepository = false) where TEntity : class;
}
}