数据库操作方式
普通sql 省略
Linq 查询 数据库
VS 中建立数据库连接
1>C:\App\Source\Github_Code\0038_dy\dyDebugToolForAll\SuperDebug\Units\NetUDPServer.cs(214,44,214,46): warning CS0168: The variable 'ex' is declared but never used
1>C:\App\Source\Github_Code\0038_dy\dyDebugToolForAll\SuperDebug\Units\NetTCPServer.cs(139,44,139,46): warning CS0168: The variable 'ex' is declared but never used
1>C:\App\Source\Github_Code\0038_dy\dyDebugToolForAll\SuperDebug\PartPanel\SqlPanel.cs(183,43,183,66): error CS1936: Could not find an implementation of the query pattern for source type 'Table<TB_OI>'. 'Select' not found.
1>C:\App\Source\Github_Code\0038_dy\dyDebugToolForAll\SuperDebug\Units\DataSend.cs(30,13,30,27): warning CS0414: The field 'DataSend.m_NowSendTimes' is assigned but its value is never used
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
出现以上错误 增加 /using System.Linq; 引用 解决
ORM EF and other ………… 完善中
1.EFCore是CodeFirst模式,本质上与数据库引擎无关,
2.Ef Core实现了批量更新
3.EFCore支持原生Sql
var blogs = context.Blogs .FromSqlRaw("SELECT * FROM test") .ToList();