05 2020 档案
摘要:Entity Framework Core配置DbContext的两种方式 使用Entity Framework 迁移过程 中遇到过一个问题,在这里拿出来晒晒。 Unable to create an object of type 'xxxContext'. For the different
阅读全文
摘要:C# 语法糖——持续更新 1. return的switch写法 public string ReturnMethod(int x) { return x switch { 2 => "2", 3 => "3", _ => "default" //_ 代表switch中的default }; } 2.
阅读全文
摘要:继续抽丝剥茧 我们知道在使用 、`xml ini json AddJsonFile json`配置源的时候,有这么两个参数: optional:配置文件可选 reloadOnChange:配置文件修改时进行重新加载 OK,动手操练操练。 test.json文件: 测试代码: 完美通过测试
阅读全文