该项目比较简单,只是单纯的把业务的dll模块和controller的dll做了一个动态的添加删除处理,目的就是插件开发。由于该项目过于简单,请勿吐槽。复杂的后续可以通过泛型的实体、dto等做业务和接口的动态区分。 项目结构如下: 上面的两个模块是独立通过dll加载道项目中的 repository动态的核心思想在此项目中是反射 public interface IRepositoryProvider { IRepository GetRepository(string serviceeName); } public class RepositoryProvider : IRepositoryProvider { public IRepository GetRepository(string x) { var path = $"{Directory.GetCurrentDirectory()}\\lib\\{x}.Repository.dll"; var _AssemblyLoadContext = new...
Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile