摘要: 一、基本查询 1.查询所有数据 [HttpGet] public IActionResult Index() { List<MdLength> list; using (var context = new DBContext_PMS1(_dBContext)) { //查询所有数据 list = c 阅读全文
posted @ 2020-06-16 16:50 富坚老贼 阅读(377) 评论(0) 推荐(0) 编辑
摘要: 有两种方式配置与数据库之间的关系模型:fluent API 配置模型 和 数据注释模型 一、创建实体模型 1.创建实体模型 [Table("T_BD_Sc")] public class Sc { [Key] public int SC_ID { get; set; } public string 阅读全文
posted @ 2020-06-16 15:45 富坚老贼 阅读(211) 评论(0) 推荐(0) 编辑