From 15fdcb7dc72e83c1312c9c805510fbb9d2d74f39 Mon Sep 17 00:00:00 2001 From: Vasily Chefonov <81791194+vasiliy-chefonov@users.noreply.github.com> Date: Fri, 14 Feb 2025 21:46:54 +0700 Subject: [PATCH] Fix the warnings SN-776 --- .../Infrastructure/EfCore/Extensions/EntityProxyExtensions.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Saritasa.NetForge/Infrastructure/EfCore/Extensions/EntityProxyExtensions.cs b/src/Saritasa.NetForge/Infrastructure/EfCore/Extensions/EntityProxyExtensions.cs index f98fbf4d..c840650d 100644 --- a/src/Saritasa.NetForge/Infrastructure/EfCore/Extensions/EntityProxyExtensions.cs +++ b/src/Saritasa.NetForge/Infrastructure/EfCore/Extensions/EntityProxyExtensions.cs @@ -20,7 +20,6 @@ public static bool IsLazyLoadingProxy(this Type type) return baseType != null && type.Namespace == CastleProxiesNamespace; } - /// /// Gets the POCO type of the entity. /// @@ -33,7 +32,7 @@ public static Type GetPocoType(this object entity) if (!entityType.IsLazyLoadingProxy()) { - throw new InvalidOperationException("The provided entity is not a lazy loading proxy."); + throw new InvalidOperationException($"The provided entity of type {entityType.Name} is not a lazy loading proxy."); } return entityType.BaseType!;