using System; using System.Collections.Generic; using Quadarax.Foundation.Core.Data.Interface.Entity; using Quadarax.Foundation.Core.Data.Interface.Entity.Dto; namespace Quadarax.Foundation.Core.Web.Extensions { public static class DtoExt { public static ResultValueDto AsResult(this TDto value) where TDto : IDto, new() { if (value==null) throw new ArgumentNullException(nameof(value)); return new ResultValueDto(value); } public static ResultsValueDto AsResult(this IEnumerable values) where TDto : IDto { if (values==null) throw new ArgumentNullException(nameof(values)); return new ResultsValueDto(values); } } }