Allow NT AUTHORITY/SYSTEM to server Role as sysadmin.
Download source code 7.86 MB
What does Repository mean?
Dictionary meaning: A place where things may be put for safekeeping.
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.
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.
interface IRepository<T> : IDisposable where T : class
T GetById(object Id);
void Insert(T model);
void Update(T model);
void Delete(object id);
In this article we will learn basic CRUD operation using Web Api-2, and Stored Procedure with a sample Desktop Application.
Let’s Create a Sample database named ‘SampleDB’ with SQL Management Studio. Using the ‘SampleDB’ now create a Table name ‘tblCustomer’.
CREATE TABLE [dbo].[tblCustomer](
[CustID] [bigint] NOT NULL,
[CustName] [nvarchar](50) NULL,
[CustEmail] [nvarchar](50) NOT NULL,
[CustAddress] [nvarchar](256) NULL,
[CustContact] [nvarchar](50) NULL,
CONSTRAINT [PK_tblCustomer] PRIMARY KEY CLUSTERED
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
In this article we will clarify our knowledge about using and posting a form with JQuery and Ajax.
Before dive into core topic let’s have an overview about JQuery and Ajax. What is it?
What is JQuery?
In This post we will learn Basic CRUD operation using ASP.Net MVC, JSON, ADO.Net, and Stored Procedure with a sample MVC Application.
Our first step is to create and design a SQL Database, below step’s we have the demonstration of creating a database table and very basic CRUD Stored Procedure. Continue reading “CRUD Operation Using ASP.Net MVC-5”
Differences between them based on their properties :
- Namespace: System.Collections Namespace
- Derives from: No base interface
- Deferred Execution : Supported
- Lazy Loading : Not Supported
- How does it work : While querying data from database, IEnumerable execute select query on server side, load data in-memory on client side and then filter data. Hence does more work and becomes slow.
- Suitable for : LINQ to Object and LINQ to XML queries.
- Custom Query : Doesn’t supports.
- Extension method parameter : Extension methods supported in IEnumerable takes functional objects.
- When to use : When querying data from in-memory collections like List, Array etc.
- Best Uses : In-memory traversal