摘要:
更新记录 转载请注明出处: 2022年10月24日 发布。 2022年10月22日 从笔记迁移到博客。 初始化数据说明 初始化数据也叫种子数据,用于定义初始化到数据库中的数据 定义初始化数据 在DbContext类型中的ModelCreating方法中进行设置初始化数据 使用HasData方法即可 阅读全文
摘要:
const random = (min, max) => Math.floor(Math.random() * (max - min + 1) + min); let result = random(1, 50); console.log(result); 阅读全文
摘要:
const round = (n, d) => Number(`${Math.round(`${n}e${d}`)}e-${d}`); let result1 = round(1.666, 2) let result2 = round(1.888, 2) console.log(result1); 阅读全文