Refactoring ,AzureConnectionString, rss, asmx–part 28

Now, I want to see that I can read from the database the exchange rates. For this, in Azure WebAPP I go to Settings => Configuration and add my connection string.

But now I have a problem: I must read from the configuration.  So back on DI with InMemory class – I inject from ASP.NET Core the Configuration and in the tests I construct directly with null.

IConfiguration configuration;

public InMemoryDB(IConfiguration config)
this.configuration = config;

private string GetConRead(string name)
return configuration?.GetConnectionString(name);


Also, for easy retrieving from URL , I modify from

public async Task<ExchangeRates[]> Rates(string bank,string fromDate, string toDate)

( that generates the url : )


public async Task<ExchangeRates[]> Rates([FromRoute] string bank, [FromRoute]string fromDate, [FromRoute]string toDate)

( that generates the URL: )


( I have also modified the route on the controller to [Route(“api/v{version:apiVersion}/rates”)] )

The modifications are at .

The bad part – the deploy takes now 7 minutes…( running tests first …)

I have to implement now the following (


I will implement first into the rates API , then I will redirect.

For example, the first one is like this: and can be implemented like this:


public async Task<ExchangeRates> RatesOnDate([FromRoute] string bank,
[FromRoute]int year, [FromRoute]int month,
[FromRoute] int day, [FromRoute] string exchange)



What about the rss ? There is a package called System.ServiceModel.Syndication in .NET Core  – and we can use for RSS like this:

public async Task<IActionResult> GetRssFeed(string bank)
var data= await ret.TodayRates(bank);
var items = data
.Select(it =>
new SyndicationItem(
new Uri($”{it.Date.Year}/{it.Date.Month}/{it.Date.Day}/{it.ExchangeTo}”))

var feed = new SyndicationFeed(
“Curs Valutar”,
“CursValutar, case, banci”,
new Uri( “”),
feed.Language = “ro-ro”;
feed.TimeToLive = TimeSpan.FromSeconds(30);
using var sw = new StringWriter();
using var rssWriter = XmlWriter.Create(sw);

var rssFormatter = new Rss20FeedFormatter(feed,false);
return Content(sw.ToString(), “text/xml”);


What about ? Found article , that says”it has no support for message security, WSDL generation, duplex channels, non-HTTP transports” – so I do not want to do. Maybe something should be left…

So , now , how I can now intercept calls like

? There is no controller ! So – middleware to help!


And one hour passes...
(This is the result of 1 hour per day auto-challenge as a full cycle developer for an exchange rates application)
( You can see the sources at )
2Reading NBR from internet
3Source control and build
4Badge and test
5CI and action
6Artifacts and dotnet try
7Docker with .NET Try
9Intermezzo - Various implementations for programmers
10Intermezzo - similar code - options
11Plugin implementation
12GUI for console
14Plugin in .NET Core 3
15Build and Versioning
16Add swagger
17Docker - first part
18Docker - second part
19Docker - build Azure
20Pipeline send to Docker Hub
21Play with Docker - online
22Run VSCode and Docker
23Deploy Azure
24VSCode see tests and powershell
25Code Coverage
26Database in Azure
27Sql In Memory or Azure
28Azure ConString, RSS
29Middleware for backward compatibility
30Identical Tables in EFCore
31Multiple Data in EFCore
32Dot net try again
33Start Azure Function
34Azure function - deploy
35Solving my problems
36IAsyncEnumerable transformed to IEnumerable and making Azure Functions works
37Azure functions - final
38Review of 37 hours
39Last Commit in AzureDevOps
40Create Angular WebSite
41Add static Angular to WebAPI .NET Core
42Docker for Angular
43Angular and CORS
44SSL , VSCode, Docker
45Routing in Angular
46RxJS for Routing
47RxJs Unsubscribe