随笔分类 - Net6
摘要:实例一: JsonSerializerSettings jsonSettings = new JsonSerializerSettings { DateFormatString = "yyyy-MM-dd HH:mm:ss.fff", }; Model model = new Model { Cre
阅读全文
摘要:using HKElectric.ESafety.Utilities; using System.ComponentModel.DataAnnotations; namespace Test { public class StringByteLengthAttribute : ValidationA
阅读全文
摘要:以纯文本形式存储密码是不安全的。 例如,存储在中的数据库连接字符串 appsettings.json 可能包含指定用户的 密码: { "ConnectionStrings": { "Movies": "Server=(localdb)\\mssqllocaldb;Database=Movie-1;
阅读全文
摘要:using System; using System.Web.DynamicData; using System.ComponentModel.DataAnnotations; [MetadataType(typeof(CustomerMetaData))] public partial class
阅读全文
摘要:模式匹配是一种测试表达式以确定其是否具有某些特征的技术。 例如, 下面的Employee类和Manager类: public class Employee { public int Id { get; set; } public string Name { get; set; } public Ma
阅读全文