Mavin world

Elegant short notes on technical concepts


.Net c#

static vs sealed classes in c#.Net

Rejuvenating SBerry is always muddled with the difference between the static and sealed classed. This morning it found out an always remembering answer with visualization. +----------+-+------------------------+-----------------+--------------------+ |Class Type| |Can inherit from others |Can be inherited |Can be instantiated | |----------|-|------------------------+-----------------+--------------------+... Continue Reading →


Segregating DataModels and the Views in Asp.Net MVC

Ever wondered what if  we separate our models classes  into a different project and access them via other Project. How does it look in Code? Yes, it's the time to see it in action with SBerry. Before we begin, let... Continue Reading →

Basic note on String Comparision Enumeration

 Sberry wants 'Delineate' to be not equal to DELINEATE which is again not equal to dElINeate and sort them based on their case and culture. How to do...? Here comes the StringComparision enum which we can pass to the comparison, equal... Continue Reading →

Clear out Confusion on Add, Attach, Create DbSet Methods.

With Sberry, let's dive in to clear out the confusion around the Add, Attach and Entry, Create and New methods of DbSet and DbContext of Entity framework. Add public virtual object Add( object entity) Simply put Adds the entity to... Continue Reading →

Handy note on Configuration and InitializationStrategy in .Net EntityFramework

The default Entity framework conventions can be overridden through two methods 1.Data Annotations 2.Fluent API. Entities and properties are configured through EntityTypeConfiguration. The ModelBuilder class provides Enity (),which return EntityTypeConfiguration object which is  used in configuration.  We can separate out... Continue Reading →

In Built Delegates in C#

Func<T,TResult>, Action and predicate delegates are inbuilts present in the system namespace. Func delegate can take one or more parameters and returns a value. The parameters can be zero to 16 and the last parameter represents a return value. If... Continue Reading →

Entity Framework Concepts made easy

Conceptual model, entity, context Entity framework. Confused?? Say No to confusion now, since I have made this blog post to throw a perfect illusion of how all these things relate to each other. Let's begin... I begin with simple... Continue Reading →

Value Type and Reference Type in C#

There are value types and reference types in c#. Value types hold the direct data i.e value  or object where as the reference types store the reference to a location in memory of the data or value or object. Value... Continue Reading →

Delegates simplified

Delegates seems very daunting topic to newbies. So here I will explain you the formal definition along with example that represents what exactly the definition mean. Formal Definition Delegates enable to encapsulate reference of a method inside a delegate object,... Continue Reading →

Create a website or blog at

Up ↑