using System.IO; using System.Linq; using System.Reflection; using AsbCloudApp.Services.WellOperationImport; namespace AsbCloudInfrastructure.Services.WellOperationImport; public class WellOperationImportTemplateService : IWellOperationImportTemplateService { public Stream GetExcelTemplateStream() { var resourceName = Assembly.GetExecutingAssembly() .GetManifestResourceNames() .FirstOrDefault(n => n.EndsWith("WellOperationImportTemplate.xlsx"))!; var stream = Assembly.GetExecutingAssembly() .GetManifestResourceStream(resourceName)!; return stream; } }