摘要:
服务的创建在创建对象时有多个构造函数符合条件,会报错System.InvalidOperationException:“Unable to activate type 'App.Qux'. The following constructors are ambiguous:要有唯一的才行 new Se 阅读全文
摘要:
using App; using System.Diagnostics; var cat = new Cat() .Register<IFoo, Foo>(Lifetime.Transient) .Register<IBar, Bar>(Lifetime.Transient) .Register(t 阅读全文
摘要:
public T Query<T>(int id) where T : BaseModel { Type type = typeof(T); string columnString = string.Join(",", type.GetProperties().Select(p => $"[{p.G 阅读全文