随笔分类 -  .NET

摘要:在cshtml使用linq操作数据集,自动补全是可以使用Select,但是一直提示System.Collection.GenericList' does not contain a definition for 'Select' ccepting a first argument of type ' 阅读全文
posted @ 2019-01-07 15:19 GodricV 阅读(348) 评论(0) 推荐(0)
摘要:最近在研究.netcore,尝试把前后端完全分离。但是在写接口的时候,Post参数是FromBody的时候报错了 关键错误点Unable to cast object of type 'System.Int32' to type 'System.String'.提示是无法将“System.Int32 阅读全文
posted @ 2018-12-12 23:00 GodricV 阅读(12306) 评论(0) 推荐(0)
摘要:定义 确保一个类有且只有一个实例,并提供一个全局访问点。 UML类图 组成部分 代码部分 以上代码在单线程情况下,线程安全。但是在多线程情况下,当多个线程同时访问Instance(),同时进行null判断时,就会进行多次实例化,这违背了单例模式的原则-一个类有且只有一个实例。 在多线程情况下,多加了 阅读全文
posted @ 2017-06-07 00:59 GodricV 阅读(211) 评论(0) 推荐(0)