using System; using System.Linq; using Quadarax.Foundation.Core.Data.Interface.Entity; using Quadarax.Foundation.Core.Data.Interface.Entity.Dto; namespace BO.AppServer.Metadata.Extensions { public static class ResultValueExt { public static bool HasNoDataException(this ResultValueDto result) where TDto : IDto, new() { if (result == null) throw new ArgumentNullException(nameof(result)); return result.Errors.Any(x => x.Code == 1099); } public static bool HasNoDataException(this ResultsValueDto result) where TDto : IDto, new() { if (result == null) throw new ArgumentNullException(nameof(result)); return result.Errors.Any(x => x.Code == 1099); } } }