Posts

Durable Functions

Image
 Durable function components: How durable functions works: Step 1: Orchestrator starts  Step 2: It will call await method (Task schedule) --> it's long running task Step 3: Then Orchestration sleeps  Steps 4: Task schedule job it will finish the job and notify the orchestration job is done like that Step 5: Orchestrator starts --> check with execution history like did call the await method or not --> it will return yes. --> then return the output Execution history plays important role to maintain the state Orchestrator always starts the task and go for sleep --> once the task completed it will update to history table and notify the orchestrator --> then orchestrator will wakeup and do the rest of work. --> when orchestrator starts again it will start from first and check with history table and based on that it will continue the job.  Orchestrator Constraints: Fan out/Fan in

VueJs

Image
 

EFCore

Image
 EFCore: If we apply multiple OrderBy in the linq queries, it will take the last one and skip the rest of the things. If you want sort the result based on multiple condition then we should use OrderBy with ThenBy for the ascending order. OrderByDescending with ThenByDescending for the descending order. When we use FirstOrDefault it uses select top 1 When we use LastOrDefault, we should use Orderby otherwise it will throw exception at run time. No compile time error Solution code for it When we use first/firstordefault/last/lastordefault/single/singleordefault, we should use orderby or orderbydescending before the firstordefault method Tracking is always expensive, avoid it where it's not required  1.First option to make the particular query as no tracking. 2. second options to make all the query as no tracking, in case if you want to particular query as tracking use as tracking method  "AsTracking()" When we are writing generic method that time we use context.Add method t...