/// <inheritdoc /> public bool DeleteToggleMark(TKey id, bool delete) { IBaseCustomizeEntity domainEntity = Get(id) as IBaseCustomizeEntity; if (domainEntity != null) { domainEntity.IsRemoved = delete; return(delete); } throw new CustomException(string.Format(Messages.Exception_EntityNotFoundTemplate, string.Empty, id)); }
/// <inheritdoc /> public async Task <bool> DeleteToggleMarkAsync(TKey id, bool delete) { IBaseCustomizeEntity domainEntity = (await GetAsync(id)) as IBaseCustomizeEntity; if (domainEntity != null) { domainEntity.IsRemoved = delete; await SaveChangesAsync(); return(delete); } throw new CustomException(string.Format(Messages.Exception_EntityNotFoundTemplate, string.Empty, id)); }