ICode9

精准搜索请尝试: 精确搜索
  • ef core2022-04-16 18:03:11

    ef core 简介 ORM:object relational mapping 让开发者用对象操作的形式操作关系型数据库 有那些orm:efcore dapper sqlsuger freesql ef core 搭建 安装:install-package microsoft.entityframeworkcore.sqlserver 搭建:建立实体类 建立DbContext 安装:package microsoft.entityfra

  • dotnetcore EF 小技巧(但不推荐)2022-02-02 20:33:54

    正常情况下,都是通过EF先取出entity,再修改或删除。 这样会生成一条select和一条update或delete语句,但是通过update/delete sql可以一句就完成。 使用以下代码,通过欺骗EF的方式,使得一句sql完成目标。 using (MyDbContext ctx = new MyDbContext()) { Student a1 = n

  • dotnetcore EF 非原生sql调用2022-02-01 20:02:11

    尽量使用EF的异步调用 await ctx.Students.ToListAsync() await foreach (var s in ctx.Students.AsAsyncEnumerable()) FormattableString使用 int a = 111; string world = "www"; FormattableString s = @$"hello {world}, {a}"; Console.WriteL

  • EFCore自己用的点东西2021-03-14 15:33:08

    测试一下EF core 的操作 蛀牙总是用导航属性有的时候有点不理解 写个例子给自己用 class Program { static void Main(string[] args) { MyDbContext myDbContext = new MyDbContext(); try {

  • mvc core 增删改查2021-03-10 14:34:28

    asp.net core Mvc 增删改查   1.创建项目   创建Data文件夹 创建实体类Students/cs public class Students { public Guid Id { get; set; } public string Name { get; set; } public int Age { get; set; } }   创建MyDbContext

  • EFCore自己用的点东西2020-11-12 11:32:36

    测试一下EF core 的操作 蛀牙总是用导航属性有的时候有点不理解 写个例子给自己用 class Program { static void Main(string[] args) { MyDbContext myDbContext = new MyDbContext(); try {

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有