摘要:
相关属性 AbsoluteRefreshTokenLifetime 设置RefreshToken的绝对过期时间。 SlidingRefreshTokenLifetime 设置RefreshToken的滑动过期时间。 RefreshTokenUsage 有两个选项: ReUse-即RefreshTok 阅读全文
摘要:
ApiResource 定义一个api资源。他的名称将会包含在accesstoken的aud这个声明中。 aud用于webapi来验证自己定义的Audience。 如图。api服务器定义了Audience,并开启了验证只有。accesstoken中的aud声明里包含了该Audience,才能通过验证 阅读全文
摘要:
不能识别写到自定义组件标签上的class 如图,我在组件标签上和html原生的标签上分别加上了class。结果只有listClass生效了。messageDropDown这个class没有生效 可能是我有些配置没配。记录一下,以后看能不能解决这个问题。 2024.02.02更新 最近又用Blazor 阅读全文
摘要:
出现这个错误是因为一些nuget包的不兼容。 阅读全文
摘要:
AppDomain.CurrentDomain.GetAssemblies() 这个方法获取的是当前应用程序域已经加载的程序集,未加载的是获取不到的(尽管引用了该项目),所以在配置依赖注入时,可能会出现有些程序集拿不到的情况,导致没有注入所有需要的服务。 Assembly.GetEntryAssem 阅读全文
摘要:
var intList = new List<int>() { 1 }; var readOnlyList = new ReadOnlyCollection<int>(intList); var immutableList = intList.ToImmutableList(); Console.F 阅读全文
摘要:
class Program { static void Main(string[] args) { var a = new AAA() { aaa = 0 }; test(a); Console.WriteLine("无Ref:"+ a.aaa); testRef(ref a); Console.W 阅读全文
摘要:
1、所注册的服务全部变成单例 阅读全文
摘要:
var res = DbSet<A>().join(DbSet<B>(),A=>new {A.Id,A.Name},B=>new {B.Id,B.Name},(A,B)=>new {A,B}; //或者 var res = DbSet<A>().join(DbSet<B>(),A=>new { Id 阅读全文
摘要:
object key = Guid.NewGuid(); //这种写法拿不到任何数据,生成的SQL语句中,也不会包含这个条件。 var a = await GetAll().Where(x => x.Id.Equals(key)).ToListAsync(); //这种写法才能拿到数据 var e 阅读全文