/// <summary> /// 保存表单(新增、修改) /// </summary> /// <param name="keyValue">主键值</param> /// <param name="entity">实体对象</param> /// <returns></returns> public void SaveForm(string keyValue, BlacklistEntity entity) { try { service.SaveForm(keyValue, entity); } catch (Exception) { throw; } }
public async Task <bool> BanUserAsync(Guid userId) { var blacklistEntity = new BlacklistEntity { Id = Guid.NewGuid(), IsBanned = true, UserId = userId }; return(await _blacklistRepository.CreateAsync(blacklistEntity)); }
public ActionResult SaveForm(string keyValue, BlacklistEntity entity) { certificatebll.SaveForm(keyValue, entity); SaveForbidden(entity.UserId, entity.Reason, 0); return(Success("操作成功。")); }
public async Task <bool> UpdateAsync(BlacklistEntity entity) { return(await _table.UpdateAsync(entity)); }
public async Task <bool> CreateAsync(BlacklistEntity entity) { return(await _table.InsertAsync(entity) == 1); }