SHASHANGKA SHEKHAR'S BLOG

Hi, I am Shashangka Shekhar, Working with Microsoft Technologies. This is my personal blog where I share some of my experiences.

ASP.NET MVC Routing

First of all let’s understand the meaning/value of routing. Routing is a verb, which mean “to send or forward by a particular route”. Well now another thing need to clear what is called route?

Route is noun which mean “a road, course, or way for travel from one place to another

Well in ASP.Net MVC Routing is how to match URLs to requested action method.

Read More

ASP.NET SignalR Basic

Today we are going to learn about SignalR with a very basic sample Asp.Net MVC project.

dicon Download source code 7.27 MB

What is SignalR?

According to Wikipedia: ASP.NET SignalR is a library for ASP.NET developers to add real-time web functionality to their applications.

SignalR is a framework for building asynchronous applications. “R” stand for “Real Time”. SignalR is a realtime communication framework built on top of the WebSoket specification.

It does fallback to classic HTTP when websockets are not supported by client or server. SignalR is stateless by design and it’s not aware of ASP.NET user session.

Read More

Palindromes

Dictionary meaning: a word, line, verse, number, sentence, etc., reading the same backward as forward, as Madam 

Palindrome in the C# language: A palindrome has the same letters on both ends of the string. This means “rotator” is a palindrome, but “advice” is not. Read More

Char, Nchar, Varchar & Nvarchar Data Types

CHAR vs VARCHAR

CHAR:

  1. It is a fixed length data type
  2. Used to store non-Unicode characters
  3. Occupiers 1 byte of space for each character

VARCHAR:

  1. It is a variable length data type
  2. Used to store non-Unicode characters
  3. Occupies 1 byte of space for each character

NCHAR vs NVARCHAR

NCHAR

  1. Is a fixed length data type
  2. Used to store Unicode characters (for example the languages Arabic, German and so on)
  3. Occupies 2 bytes of space for each character

NVARCHAR

  1. It is a variable-length data type
  2. Used to store Unicode characters
  3. Occupies 2 bytes of space for each character

Program to print *

Output:
*
**
***
****
*****

Diffrence between Write and WriteLine

Read More

What is ORM?

Object-relational mapping (ORM, O/RM, and O/R mapping) in computer science is a programming technique for converting data between incompatible type systems in object-oriented programming languages.

ORM is a tool for storing data from domain objects to relational database like MS SQL Server, in an automated way, without much programming. O/RM includes three main parts:

  1. Domain class objects,
  2. Relational database objects and
  3. Mapping information on how domain objects map to relational database objects (tables, views & storedprocedures).

ORM allows us to keep our database design separate from our domain class design. This makes the application maintainable and extendable. It also automates standard CRUD operation (Create, Read, Update & Delete) so that the developer doesn’t need to write it manually.

Click for more

MVC5 CRUD Using Generic Repository Pattern

dicon Download source code 7.86 MB

What does Repository mean?
Dictionary meaning: A place where things may be put for safekeeping.

Repository Pattern:
The Repository Pattern allows to centralise all data access logic in one place. It is a common construct to avoid duplication of data access logic throughout our application. The Repository pattern adds a separation layer between the data and business layers of an application.

IC340233

Generic Repository Pattern:
A generic(relating to) repository is often used with the ORM(entity framework) to speed up the process of creating a data layer.With generic feature, we can reduce the amount of code we need for common scenarios.

Read More