Calling an stored procedure using ADO.NET Entity Model (Entity Framework LINQ to SQL)

Calling an stored procedure using ADO.NET Entity Model (Entity Framework LINQ to SQL)

In this article I would like to share something regarding Entity Framework, how we can implement operations using Stored Procedures in Entity Framework. SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[Users]( [Uid] [int] IDENTITY(1,1) NOT NULL, [Fname] [nvarchar](50) NULL, [Lname] [nvarchar](50) NULL, [Email] [nvarchar](50) NULL, [Gender] [nvarchar](50) NULL, [Address] [nvarchar](50) NULL, CONSTRAINT [PK_Users] PRIMARY KEY CLUSTERED ( [Uid] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] GO SET ANSI_NULLS ON GO
Check/Uncheck GridView Rows using a Checkbox in JQuery

Check/Uncheck GridView Rows using a Checkbox in JQuery

I have a one gridview with checkboxes here my requirement is if I select header checkbox of gridview I need to select all the child checkboxes in gridview and if I deselect header checkbox I need to deselect all the child checkboxes in gridview and if I select all the child checkbox I need to select the header checkbox and if any child checkbox deselected I need to deselect header checkbox for this I have written JQuery function to achieve this functionality. Design Page------------------------------------------------------------------------- < %@ Page Language="C#" AutoEventWireup="true" CodeFile="TestingPage.aspx.cs" Inherits="TestingPage" %> < !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Export Data From GridView To Excel in Asp.net

Export Data From GridView To Excel in Asp.net

A good way to display data is to show it in a GridView. However, it becomes difficult to manipulate and filter large amounts of data in this way. Exporting data to an Excel file is a great solution for handling large amounts of data because Excel has many features -- such as sorting, searching and filtering.
Different Types of SQL Joins

Different Types of SQL Joins

In SQL joins are used to get data from two or more tables based on relationship between some of the columns in tables. In most of the cases we will use primary key of first table and foreign key of secondary table to get data from tables by using this relationship we can reduce the duplication of data in every table. I will explain types of SQL JOINs in in this article. JOINs in SQL Server can be classified as follows: INNER JOIN LEFT OUTER JOIN RIGHT OUTER JOIN FULL OUTER JOIN CROSS JOIN SELF JOIN LEFT JOIN RIGHT JOIN Each type is explained below with suitable examples: Let’s consider two tables as Table1 & Table2 for our example. – CREATE TEST TABLES CREATE TABLE Table1(ID [int], Code [varchar](10)); GO CREATE TABLE Table2(ID [int], Amount [int]); GO
Introduction to LINQ

Introduction to LINQ

Language Integrated Query (LINQ) provides .NET developers some new and exciting features to query and manipulate data in a consistent and uniform way. It enables them to work with different type of data sources such as Arrays, collection of objects, XML documents, a relational databases, Active Directory or even Microsoft Excel sheets by writing or embedding queries in C# or Visual Basic language. Microsoft has introduced many new keywords and features in both C# and Visual Basic languages to integrate LINQ technology. Microsoft has also added new namespaces in .NET Framework Library that contains new interfaces and hundreds of extension methods also called LINQ query operators. These methods perform different operations on different type of data sources in LINQ. LINQ stands for Language-Integrated Query. Basically LINQ address the current database development model in the context of Object Oriented Programming Model. If some one wants to develop database application on .Net platform the very simple approach he uses ADO.Net. ADO.Net is serving as middle ware in application and provides complete object oriented wrapper around the database SQL.So developer must have good knowledge of object oriented concept as well as SQL to develop an application. But incase of Linq SQL statements are become part of the C# and VB.Net code so there are less chance of mistake.