MVC5 CRUD Using Generic Repository Pattern

MVC

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.

Continue reading “MVC5 CRUD Using Generic Repository Pattern”

CRUD – ASP.Net MVC, Web Api-2, Windows Form

IIS, MVC, Web API, Windows Form

In this article we will learn basic CRUD operation using Web Api-2, and Stored Procedure with a sample Desktop Application.

Download Source Code

0

Sample Database:

Let’s Create a Sample database named ‘SampleDB’ with SQL Management Studio. Using the ‘SampleDB’ now create a Table name ‘tblCustomer’.

Script:

Continue reading “CRUD – ASP.Net MVC, Web Api-2, Windows Form”

ASP.NET MVC – Using JQuery, AJAX

AJAX, MVC

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?

Well, JQuery is a framework (tools) for writing JavaScript, Walk as “write less, do more”, jQuery is to make easier to use JavaScript.

What is JavaScript?

JavaScript is an object-oriented computer programming (Scripting)language commonly used to create interactive effects within web browsers.

Continue reading “ASP.NET MVC – Using JQuery, AJAX”

IEnumerable Vs IQueryable

C# Basic, MVC

Differences between them based on their properties :

IEnumerable

  1. NamespaceSystem.Collections Namespace
  2. Derives from: No base interface
  3. Deferred Execution : Supported
  4. Lazy Loading : Not Supported
  5. 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.
  6. Suitable for : LINQ to Object and LINQ to XML queries.
  7. Custom Query : Doesn’t supports.
  8. Extension method parameter : Extension methods supported in IEnumerable takes functional objects.
  9. When to use : When querying data from in-memory collections like List, Array etc.
  10. Best Uses : In-memory traversal

Continue reading “IEnumerable Vs IQueryable”

Install (IIS)

IIS