C# Performance Tips

Check List has items List.Count() vs List.Any() Stopwatch watch = new Stopwatch(); List < string > strs = new List < string > () { “Akshay”, “Patel”, “Panth”, “Patel” }; watch.Start(); if (strs.Count() > 0) {} Console.WriteLine(“List.Count()-{0}”, watch.Elapsed); ——– watch.Restart(); if (strs.Any()) {} Console.WriteLine(“List.Any() – {0}”, watch.Elapsed);   Loop on items in a list Array.Length vs var i […]

Entity Signal – Real Time Entity Framework (EF) and ASP.NET core

What is Entity Signal? Entity Signal allows you to connect to Entity Framework through SignalR and get updates on subscribed data in real time. This lowers the number of refreshes done by the user and ultimately allows you to do more with fewer servers. It is also requires minimal changes, so you can make realtime apps about as […]