Posts

Advanced Dictionary for DotNet

Dictionary is a very common data structure being used in an application for basic use to hold key-value pair to in-memory cache store. Dot-Advanced-Dictionary  is a .Net open source library which adds a bit of crunch on top of regular dictionary. It provides the option to limit the size of the dictionary to reduce the memory consumption with auto removal of least used item(s). While creating the instance of the dictionary, you need to specify the maximum size (in terms of data) and the library will manage to keep the dictionary within that size. It also includes auto-retrieval of value option if key not found in dictionary. A small, lightweight and very useful library. There is also .Net Core flavor available at  Dot-Advanced-Dictionary for .Net Core . Go ahead and start using it.

Stored Procedures with Entity Framework - Performance Benchmark

Image
Object-relational mapping (ORM) frameworks are crucial part of the application.  No one wants  to write the raw queries and working with raw data anymore.  Recently I got a chance to perform  some performance tests between Entity Framework (EF 6) regular approach and calling stored procedure  using EF.  The test was very simple and results were surprising. Just assume we have some web application  and  we are doing logging for each request (request time, IP, user etc.) in database using EF. There is a logging  table in the database  with the name  RequestLogging   and it has following columns (just for demonstration purpose): Id (int - Identity) RequestTime (datetime) OperationId (int) [Foreign key from Operation table] IpAddress (varchar(20)) UserId (int) [Foreign key from User table] RequestStatus (char(1)) [S - succes and F - failed] The Test Environment The test application is very simple. It has entity model (edmx) file which contains all the tables in th

Queue the message with DynamicQueue

Image
DynamicQueue is an open source framework developed in .net C# with full flexibility and extension options. Go ahead have a read about it at  DynamicQueue - Github   and install the packages through the  nuget  from   Nuget Packages