refactor: simplify GetCollectionNamesFromAssembly method by using array syntax

This commit is contained in:
Jean Gatto
2025-03-23 08:50:40 -03:00
parent 93fc84aaa6
commit 483f53120f
@@ -102,12 +102,11 @@ public sealed class NoSqlDbContext : IReadDbContext, ISynchronizeDb
} }
private static List<string> GetCollectionNamesFromAssembly() => private static List<string> GetCollectionNamesFromAssembly() =>
Assembly [.. Assembly
.GetExecutingAssembly() .GetExecutingAssembly()
.GetAllTypesOf<IQueryModel>() .GetAllTypesOf<IQueryModel>()
.Select(impl => impl.Name) .Select(impl => impl.Name)
.Distinct() .Distinct()];
.ToList();
#endregion #endregion