/// <summary> /// Initializes a new instance of the <see cref="ServiceStore"/> class. /// </summary> /// <param name="context">The context.</param> /// <param name="logger">The logger.</param> /// <exception cref="ArgumentNullException">context</exception> public ServiceStore(IRegistryDbContext context, ILogger <ServiceStore> logger) { _context = context ?? throw new ArgumentNullException(nameof(context)); _logger = logger; }
/// <summary> /// Creates a query for the services /// </summary> /// <param name="context"></param> /// <returns></returns> public static IIncludableQueryable <Service, List <ServicePublicUrl> > CreateServiceQuery(this IRegistryDbContext context) { return(context.Services .Include(s => s.Endpoints) .Include(s => s.IpAddresses) .Include(s => s.PublicUrls)); }