❔ API Call really slow (6+ seconds) on first call, then fast (100ms) afterwards

without looking it up, i asume you are using entity framework. EF is doing magic on first call, which takes some time.
public async Task<IActionResult> GetList()
   // ** todo get this to order by OrderIndex **
   var dynContentList = _context.DynamicContents
      .OrderByDescending(x => x.OrderIndex)
      .Select(d => new DynamicContentDTO(d))
      .ToLookup(x => x.Name);

   return Ok(dynContentList);
the issue was happening every 15-30 mins but i think it's because Azure App was doing funny stuff
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.

Looking for more? Join the community!

Recommended Posts
Clean up LINQ statements?```cs var cashFlowDates = db.CashFlows.Include(cash => cash.Cells).OrderByDescending(cash => cash.Id✅ Awaiting a method exits programI don't why but awaiting this method will result in the code exiting with only ever reaching Checkpo✅ Mono.Cecil.ParameterDefinition.HasDefaultin mono.cecil in a ParameterDefinition, what does HasDefault mean? I was hoping for it to be that if❔ How would I replace a CSV file line by line with another array?I have a 6x8 CSV file full of 0s and 1s, and I want to replace the CSV file with another 2D array th❔ How do I resolve a 'package downgrade' if one of my dependencies needs an older version of a dll?I'm developing an app that uses the newest EntityFramework Core 7 (.NET 7) to communicate with its o❔ Will I get a performance hit if I use the Enum type as a key value for a Dictionary?See Code below: ``` public enum Tee1 { None } public enum Tee2 { None } class Program { ✅ Design decision over multiple inserts in a single commandHi, any design suggestions on how to handle an update command from a mvc form which update needs to ❔ Create a HostedService using BackgroundService to listen to requestsHello, I am currently trying to build a BankAccount project and I wrote my business logic. My next ❔ When Vpn connectivity is off don't crash the app.I have built this logic it does make a popup appear with a message about vpn not being connected if ❔ Update-Database errorGetting the following error with the following migration, is anyone able to tell why? https://pasteb❔ PDF generation library?I'm looking for a way to generate PDF file in an ASP.NET application.❔ Entity Framwork SQLite AddHello, i've a little problem there. I'm trying to add something new in my database but i do not unde❔ Following BPM with codeI’m wanting to create my own very small dmx light show maker in c#. I realize it takes **forever** t❔ System.NullReferenceException 'Object reference not set to an instance of an object.'Hello! I'm getting a little desperate here: This is my index code: ``` public IActionResult Index()