public static ValidatorResult DeleteById <TEntity, TKey>(this IEntityManager <TEntity, TKey> manager, TKey id)
     where TKey : IEquatable <TKey>
     where TEntity : class, IEntity <TKey>
 {
     if (manager == null)
     {
         throw new ArgumentNullException("manager");
     }
     return(AsyncHelper.RunSync(() => manager.DeleteByIdAsync(id)));
 }