• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
PowerCoder
博客园    首页    新随笔    联系   管理    订阅  订阅
上一页 1 ··· 40 41 42 43 44 45 46 47 48 ··· 68 下一页
2018年10月11日
ASP.NET Core 运行原理剖析 (转载)
摘要: 1.1. 概述 在ASP.NET Core之前,ASP.NET Framework应用程序由IIS加载。Web应用程序的入口点由InetMgr.exe创建并调用托管。以初始化过程中触发HttpApplication.Application_Start()事件。开发人员第一次执行代码的机会是处理App 阅读全文
posted @ 2018-10-11 11:30 PowerCoder 阅读(2742) 评论(0) 推荐(0)
EF Core中如何通过实体集合属性删除从表的数据
摘要: 假设在数据库中有两个表:Person表和Book表,Person和Book是一对多关系 Person表数据: Book表数据: 可以看到数据库Book表中所有的数据都属于Person表中"F"这个人 Person表,下面的Person类是该表在EF Core中的实体类型: public partia 阅读全文
posted @ 2018-10-11 01:09 PowerCoder 阅读(3886) 评论(0) 推荐(0)
2018年10月10日
Many-to-many relationships in EF Core 2.0 – Part 4: A more general abstraction
摘要: In the last few posts we saw how to hide use of the join entity from two entities with a many-to-many relationship. This post doesn’t add any addition 阅读全文
posted @ 2018-10-10 22:33 PowerCoder 阅读(449) 评论(0) 推荐(0)
Many-to-many relationships in EF Core 2.0 – Part 3: Hiding as ICollection
摘要: In the previous post we ended up with entities that hide the join entity from the public surface. However, it was not possible to add or removed entit 阅读全文
posted @ 2018-10-10 22:27 PowerCoder 阅读(406) 评论(0) 推荐(0)
Many-to-many relationships in EF Core 2.0 – Part 2: Hiding as IEnumerable
摘要: In the previous post we looked at how many-to-many relationships can be mapped using a join entity. In this post we’ll make the navigation properties 阅读全文
posted @ 2018-10-10 22:24 PowerCoder 阅读(381) 评论(0) 推荐(0)
Many-to-many relationships in EF Core 2.0 – Part 1: The basics
摘要: 转载这个系列的文章,主要是因为EF Core 2.0在映射数据库的多对多关系时,并不像老的EntityFramework那样有原生的方法进行支持,希望微软在以后EF Core的版本中加入原生支持多对多关系的Fluent API,这样这个系列的文章就不需要看了~ As of EF Core 2.0, 阅读全文
posted @ 2018-10-10 22:19 PowerCoder 阅读(483) 评论(0) 推荐(0)
EF Core如何输出日志到Visual Studio的输出窗口
摘要: 我们在使用EF Core的时候,很多时候需要在Visual Studio的输出窗口中知道EF Core在后台生成的SQL语句是什么,这个需求可以通过自定义EF Core的ILoggerFactory和ILogger类来实现: 首先定义一个实现了ILogger接口的类EFLogger,主要目的是将EF 阅读全文
posted @ 2018-10-10 22:03 PowerCoder 阅读(1575) 评论(0) 推荐(1)
EF Core怎么只Update实体的部分列数据
摘要: 下面是EF Core中的一个Person实体: 其中我们通过Fluent API指定了Code是Key属性,用来Update和Delete数据(包括DbSet的Contains方法也是查找的实体的Key属性值): 现在我们可以通过代码先new一个Person实体,然后声明其Key属性列Code的值, 阅读全文
posted @ 2018-10-10 21:35 PowerCoder 阅读(11299) 评论(3) 推荐(4)
EF Core 2.0中怎么用DB First通过数据库来生成实体
摘要: 要在EF Core使用DB First首先要下载三个Nuget包,在Nuget的Package Manager Console窗口中依次敲入下面三个命令即可: Microsoft.EntityFrameworkCore.SqlServer Install-Package Microsoft.Enti 阅读全文
posted @ 2018-10-10 18:36 PowerCoder 阅读(1962) 评论(0) 推荐(0)
EF Core中关于Microsoft.EntityFrameworkCore.DynamicLinq的使用(转载)
摘要: 项目中经常用到组合条件查询,根据用户配置的查询条件进行搜索,拼接SQL容易造成SQL注入,普通的LINQ可以用表达式树来完成,但也比较麻烦。有个Microsoft.EntityFrameworkCore.DynamicLinq用起来比较方便。 NuGet: Install-Package Micro 阅读全文
posted @ 2018-10-10 18:06 PowerCoder 阅读(4410) 评论(0) 推荐(1)
上一页 1 ··· 40 41 42 43 44 45 46 47 48 ··· 68 下一页
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3