Relative Content

Tag Archive for c#asp.net.net

How can I dynamically add select items in a link query?

I have this Iqueryable IQueryable<ScreenerData> query = _context.ScreenerData; which is financial metrics I have made a screener which filters out items. But I want to return some fixed data which doesnt change + the conditions based on my input so for example the fixed data might be something like revenue, pe, ebit but in the filter I have something like marketcap > 1000 and so i want to pass back revenue, pe, ebit, marketcap

Parallel Foreach not returning the expected result

I implemented a sample application to see the behavior of the retries inside a parallel foreach loop. As per my observations following application not showing all the values inside the array ,in the textbox (Showing character number changes randomly).

Parallel Foreach not giving expected result

I implemented a sample application to see the behavior of the retries inside a parallel foreach loop. As per my observations following application not showing all the values inside the array ,in the textbox (Showing character number changes randomly) . I want to know what cause this behavior.Thanks

How to inject serviceProvider to static class?

My code get all types, which use interface IHealthCheckable.
IHealthCheckable have 1 method, I want to call it for each type.
It is extension method in static class, so I can’t inject serviceProvider here.
But I need it – how can I get it?

Incorrect Date Formatting in .NET 6 with DateOnly Type

I’m facing an issue with the DateOnly type in a .NET 6 API where the date format is not mapped correctly when passed via a query parameter. The expected date format is dd.MM.yyyy, which is standard for Norway, but it’s being interpreted as MM.dd.yyyy instead.