爱思开
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
529 B

2 years ago
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace NFine.Repository
  7. {
  8. /// 通用的Repository工厂
  9. /// </summary>
  10. /// <typeparam name="T"></typeparam>
  11. public class RepositoryFactory<T> where T : new()
  12. {
  13. /// <summary>
  14. /// 定义通用的Repository
  15. /// </summary>
  16. /// <returns></returns>
  17. public IRepository<T> Repository()
  18. {
  19. return new Repository<T>();
  20. }
  21. }
  22. }