public async Task <ActionResult> Edit(Misc misc) { var entity = await MiscService.GetByIdAsync(misc.Id) ?? throw new NotFoundException("杂项页未找到"); entity.ModifyDate = DateTime.Now; entity.Title = misc.Title; entity.Content = await ImagebedClient.ReplaceImgSrc(misc.Content.ClearImgAttributes()); bool b = await MiscService.SaveChangesAsync() > 0; return(ResultData(null, b, b ? "修改成功" : "修改失败")); }