SHASHANGKA SHEKHAR'S BLOG

Author, TechWriter

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

Pages:1...12131415161718...32