|
@@ -368,7 +368,14 @@ namespace Hotline.Repository.SqlSugar
|
|
|
|
|
|
public async Task UpdateAsync(TEntity entity, bool ignoreNullColumns = true, CancellationToken cancellationToken = default)
|
|
|
{
|
|
|
- _serviceProvider.GetService<DatabaseEventDispatcher>()?.Dispatch(entity, DataFilterType.UpdateByObject, true);
|
|
|
+ try
|
|
|
+ {
|
|
|
+ _serviceProvider.GetService<DatabaseEventDispatcher>()?.Dispatch(entity, DataFilterType.UpdateByObject, true);
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ var msg = e.Message;
|
|
|
+ }
|
|
|
await Db.Updateable(entity)
|
|
|
.IgnoreColumns(ignoreAllNullColumns: ignoreNullColumns)
|
|
|
.IgnoreColumns(d => d.CreationTime)
|