public virtual async Task <bool> Update(TEntity entity) { if (entity.Index == Guid.Empty) { return(await EntityQueryable.AddAsync(entity)); } else { return(await EntityQueryable.EditAsync(entity)); } }