Application Level Caching I was recently asked about why we are using Redis in a solution and thought I would share the reasonings here. The question really had more to do with distributed cache than Redis itself. The uses here could just as well apply to another similar service, such as:
Memcached Redis Dragonfly KeyDB CouchDB, MongoDB or other no-sql/document db While some of these offer more than just distributed in-memory data store, that is the focused use here.
Database operation expected to affect 1 row(s) but actually affected 0 row(s) In EF Core, there is a rule that is not obvious about setting the primary key on child entities and adding it to the parent when the parent entity has already been saved (or retrieved from the context).
When creating a parent entity that is not saved, when you add a child entity where you are manually setting the primary key, you will not see this behavior.
Choosing between numeric types in C# Choosing between double, decimal, and float in C# depends on the specific requirements of your application. Each of these types has its own characteristics, and the choice should be made based on factors such as precision, range of values, memory usage, and performance.
double:
Use double when you need a wide range of representable values and can tolerate some loss of precision. Suitable for general-purpose mathematical calculations where high precision is not critical.
SonarCloud SonarCloud is a cloud based source code static analysis tool that can analyze code based on Sonar defined rules for security, performance, code quality and overall code standards.
Key Features:
Branch/pull request based tracking Analysis result summary output to pull request link to full results Static analysis of source for security, performance, coding standards, use of language features and quality Capture of code coverage results from automated test run Visualization of combined static analysis and code coverage New code analysis from full code analysis to see impact of changes in branch allows for enforcing standards on new/changed code without having to bring entire code base up to expectations first.