/// <summary> /// Delete a entity /// </summary> /// <param name="manager"></param> /// <param name="entity"></param> /// <returns></returns> public static ValidatorResult Delete <TEntity, TKey>(this IEntityManager <TEntity, TKey> manager, TEntity entity) where TKey : IEquatable <TKey> where TEntity : class, IEntity <TKey> { if (manager == null) { throw new ArgumentNullException("manager"); } return(AsyncHelper.RunSync(() => manager.DeleteAsync(entity))); }
public async Task <ICommandResult <Doc> > DeleteAsync(Doc model) { var result = await _entityManager.DeleteAsync(model); if (result.Succeeded) { // Expire simple entity cache for docs _simpleEntityStore.CancelTokens(null); } return(result); }
public async Task <ICommandResult <Article> > DeleteAsync(Article model) { return(await _entityManager.DeleteAsync(model)); }
public async Task <ICommandResult <Question> > DeleteAsync(Question model) { return(await _entityManager.DeleteAsync(model)); }
public async Task <ICommandResult <Idea> > DeleteAsync(Idea model) { return(await _entityManager.DeleteAsync(model)); }
public async Task <ICommandResult <Topic> > DeleteAsync(Topic model) { return(await _entityManager.DeleteAsync(model)); }