首页 > 其他分享 >ABP CORE+EF 批量删除、修改

ABP CORE+EF 批量删除、修改

时间:2023-05-06 11:58:05浏览次数:29  
标签:CORE Contains 删除 批量 EF ABP Repository Where GetAll

//物理删除()
//await this.Repository.GetAll().Where(p => input.Ids.Contains(p.Id)).BatchDeleteAsync();
//逻辑删除,批量修改删除字段
await this.Repository.GetAll().Where(p => input.Ids.Contains(p.Id)).BatchUpdateAsync(p => new ShopCustomers()
{
IsDeleted = true,
DeleterUserId = AbpSession.UserId,
DeletionTime = DateTime.Now
});

标签:CORE,Contains,删除,批量,EF,ABP,Repository,Where,GetAll
From: https://www.cnblogs.com/liaer/p/17376796.html

相关文章

  • [CodeForces-143A]题解(C++)
    PartIPreface原题目(Luogu)原题目(CodeForces)PartIISketch设有一个\(2\times2\)的棋盘,上面可以填入\(1-9\)的数字。给出\(6\)个数字,为每行每列以及每个对角线上的数字之和,求相应的摆放方式,无解输出\(-1\)。PartIIIAnalysis观察此题数据规模,不难发现数据......
  • Python asyncore socket客户端开发基本使用
    导读asyncore库是python的一个标准库,提供了以异步的方式写入套接字服务的客户端和服务器的基础结构,这篇文章主要介绍了Pythonasyncoresocket客户端开发基本使用,需要的朋友可以参考下介绍asyncore库是python的一个标准库,提供了以异步的方式写入套接字服务的客户端和服......
  • [CodeForces-1104A]题解(C++)
    PartIPreface原题目(Luogu)原题目(CodeForces)PartIISketch给定一个整数\(n\)。将\(n\)拆分成一个数列\(a_1,a_2,a_3,\dots,a_m\)。使得\(\sum\limits_{k=1}^{m}a_k=n\),每个\(a_i\in[0,9]\)且数列中不相同的数的数量尽量少。PartIIIAnalysis我们很容易......
  • Error creating bean with name ‘dataSource‘ defined in class path resource解决
    原因是导入了jdbc的依赖,使用@Configuration注解向spring注入了dataSourcebean。但是因为工程中没有关于dataSource相关的配置信息,当spring创建dataSourcebean因缺少相关的信息就会报错。有两个办法:办法1:去除spring-boot-starter-jdbc的依赖或者mybatis的依赖办法2:在Sprin......
  • The plugin distribution bundles IDE packages 'com.intellij.uiDesigner.core',
    错误描述:TheplugindistributionbundlesIDEpackages'com.intellij.uiDesigner.core','com.intellij.uiDesigner'.BundlingIDEpackagesisconsideredbadpracticeandmayleadtosophisticatedcompatibilityproblems.Considerexcludingthe......
  • [CodeForces-545A]题解(C++)
    PartIPreface原题目(Luogu)原题目(CodeForces)PartIISketch给定一个正整数\(n\),表示汽车数量。给定一个\(n\timesn\)阶矩阵\(A\),第\(i\)行\(j\)列上的数字表示\(i\)车与\(j\)车的对撞情况。\(\begin{aligned}\begin{cases}A_{i,j}=-1&i,j\text{车没......
  • [CodeForces-545A]题解(C++)
    PartIPreface原题目(Luogu)原题目(CodeForces)PartIISketch给定一个正整数\(n\),表示汽车数量。给定一个\(n\timesn\)阶矩阵\(A\),第\(i\)行\(j\)列上的数字表示\(i\)车与\(j\)车的对撞情况。\(\begin{aligned}\begin{cases}A_{i,j}=-1&i,j\text{车没......
  • 爬取过程中出现stale element reference: element is not attached to the page docum
    Bug实际情况描述如下:当我想爬取信息类型中的6个元素时,使用这样的1smallClassList=seleniumService.waitFindElements(bidCrawler.getSmallClassTag());2for(WebElementsmallLi:smallClassList){3try{4Thr......
  • 在.NetCore中 DDD中基于mediatr实现领域事件并结合EFCore进行二次封装
    [源代码地址https://github.com/junkai-li/NetCoreKevin]基于NET6搭建跨平台WebApi架构支持单点登录、多缓存、自动任务、分布式、多租户、日志、授权和鉴权、网关注册与发现、CAP集成事件、领域事件、docker部署**首要要理解什么是领域事件?**领域事件是指发生在特定领域中的......
  • .net core HttpClient
    .netcoreHttpClient使用之掉坑解析(一)-Jlion-博客园(cnblogs.com) ......