0

I have a requirement to load a file either it might be a JSON file or an XML based on a flag and update the file and save it another location But these files are located in another project. So, whenever I execute my API and execution comes to business logic I want to load the .json or .xml file. But how do I get the file path when I'm currently in the business logic class.

Can anyone help me on this

    api
      - controllers
    core
      - Business Logic
           => BusinessLogic class
      - Dtos
      - Assets
           => .json file
           => .xml file
    

Below is my csProj

<ItemGroup>
    <None Update="Assets\Sample.json">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
  </ItemGroup>       

Thanks in advance !!

Vijay
  • 539
  • 2
  • 7
  • 18

0 Answers0