mirror of
https://github.com/Prowlarr/Prowlarr
synced 2026-04-11 23:40:43 +02:00
Fixed: Apply Lazyload on Model Update and Insert
This commit is contained in:
parent
4dec6dd8c4
commit
ad55a67a3f
2 changed files with 4 additions and 2 deletions
|
|
@ -177,6 +177,7 @@ private TModel Insert(IDbConnection connection, IDbTransaction transaction, TMod
|
|||
var id = (int)multi.Read().First().id;
|
||||
_keyProperty.SetValue(model, id);
|
||||
|
||||
_database.ApplyLazyLoad(model);
|
||||
return model;
|
||||
}
|
||||
|
||||
|
|
@ -213,6 +214,7 @@ public TModel Update(TModel model)
|
|||
UpdateFields(conn, null, model, _properties);
|
||||
}
|
||||
|
||||
_database.ApplyLazyLoad(model);
|
||||
ModelUpdated(model);
|
||||
|
||||
return model;
|
||||
|
|
|
|||
|
|
@ -105,8 +105,8 @@ public virtual TProviderDefinition Create(TProviderDefinition definition)
|
|||
|
||||
public virtual void Update(TProviderDefinition definition)
|
||||
{
|
||||
_providerRepository.Update(definition);
|
||||
_eventAggregator.PublishEvent(new ProviderUpdatedEvent<TProvider>(definition));
|
||||
var updatedDef = _providerRepository.Update(definition);
|
||||
_eventAggregator.PublishEvent(new ProviderUpdatedEvent<TProvider>(updatedDef));
|
||||
}
|
||||
|
||||
public virtual void Update(IEnumerable<TProviderDefinition> definitions)
|
||||
|
|
|
|||
Loading…
Reference in a new issue