Thursday, 20 November 2014

MVC Pattern

1.LM.Data (EDMX)
2.LM.Repository (Ref.- Data)
3.LM.Service(Ref.- Data,Repository)
4.LM.Model
4.LM.Presentation(Ref.- Data,Repository,Service,Model)
5.LM.Test


LM.Repository
1.
 public partial interface IGenericRepository<TEntity> where TEntity : class
    {
        /// <summary>
        /// Gets the by identifier.
        /// </summary>
        /// <param name="ID">The identifier.</param>
        /// <returns></returns>
        TEntity GetByID(object ID);

        /// <summary>
        /// Inserts the specified entity.
        /// </summary>
        /// <param name="entity">The entity.</param>
        /// <returns></returns>
        TEntity Insert(TEntity entity);

        /// <summary>
        /// Updates the specified entity.
        /// </summary>
        /// <param name="entity">The entity.</param>
        void Update(TEntity entity);

        /// <summary>
        /// Updates the specified entity.
        /// </summary>
        /// <param name="entity">The entity.</param>
        /// <param name="ID">The identifier.</param>
        void Update(TEntity entity, object ID);

        /// <summary>
        /// Deletes the specified entity.
        /// </summary>
        /// <param name="entity">The entity.</param>
        void Delete(TEntity entity);

        /// <summary>
        /// Gets the table.
        /// </summary>
        /// <value>
        /// The table.
        /// </value>
        IQueryable<TEntity> Table { get; }
    }

2.
public partial class GenericRepository<TEntity> : IGenericRepository<TEntity> where TEntity : class
    {

        protected readonly DbContext _context;
        protected DbSet<TEntity> _entities;

        /// <summary>
        /// Initializes a new instance of the <see cref="GenericRepository{TEntity}"/> class.
        /// </summary>
        /// <param name="context">The context.</param>
        public GenericRepository(DbContext context)
        {
            this._context = context;
        }

        /// <summary>
        /// Gets the by identifier.
        /// </summary>
        /// <param name="ID">The identifier.</param>
        /// <returns></returns>
        public TEntity GetByID(object ID)
        {
            return this.Entities.Find(ID);
        }

        /// <summary>
        /// Inserts the specified entity.
        /// </summary>
        /// <param name="entity">The entity.</param>
        /// <returns></returns>
        /// <exception cref="System.ArgumentNullException">entity</exception>
        public TEntity Insert(TEntity entity)
        {
            try
            {
                if (entity == null)
                    throw new ArgumentNullException("entity");

                this.Entities.Add(entity);

                this._context.SaveChanges();

                return entity;
            }
            catch (DbEntityValidationException dbEx)
            {
                var msg = string.Empty;

                foreach (var validationErrors in dbEx.EntityValidationErrors)
                    foreach (var validationError in validationErrors.ValidationErrors)
                        msg += string.Format("Property: {0} Error: {1}", validationError.PropertyName, validationError.ErrorMessage) + Environment.NewLine;

                var fail = new Exception(msg, dbEx);
                //Debug.WriteLine(fail.Message, fail);
                throw fail;
            }
        }

        /// <summary>
        /// Updates the specified entity.
        /// </summary>
        /// <param name="entity">The entity.</param>
        /// <exception cref="System.ArgumentNullException">entity</exception>
        public void Update(TEntity entity)
        {
            try
            {
                if (entity == null)
                    throw new ArgumentNullException("entity");

                var entry = _context.Entry<TEntity>(entity);
                var set = _context.Set<TEntity>();

                if (entry.State == EntityState.Detached)
                {
                    // It is DB-First appraoch now & our base class is not defined,
                    // So have to Fetch ID first.
                    var ID = entity.GetType().GetProperty("ID").GetValue(entity, null);

                    // And then update.
                    TEntity attachedEntity = set.Find(ID);  // You need to have access to key

                    if (attachedEntity != null)
                    {
                        var attachedEntry = _context.Entry(attachedEntity);

                        attachedEntry.CurrentValues.SetValues(entity);

                        this._context.SaveChanges();
                    }
                    else
                    {
                        entry.State = EntityState.Modified; // This should attach entity
                    }
                }
                else
                {
                    set.Attach(entity);
                    entry.State = EntityState.Modified;
                    _context.SaveChanges();
                }
            }
            catch (DbEntityValidationException dbEx)
            {
                var msg = string.Empty;

                foreach (var validationErrors in dbEx.EntityValidationErrors)
                    foreach (var validationError in validationErrors.ValidationErrors)
                        msg += Environment.NewLine + string.Format("Property: {0} Error: {1}", validationError.PropertyName, validationError.ErrorMessage);

                var fail = new Exception(msg, dbEx);
                //Debug.WriteLine(fail.Message, fail);
                throw fail;
            }
        }

        /// <summary>
        /// Updates the specified entity.
        /// </summary>
        /// <param name="entity">The entity.</param>
        /// <param name="ID">The identifier.</param>
        /// <exception cref="System.ArgumentNullException">entity</exception>
        public void Update(TEntity entity, object ID)
        {
            try
            {
                if (entity == null)
                    throw new ArgumentNullException("entity");

                var entry = _context.Entry<TEntity>(entity);

                if (entry.State == EntityState.Detached)
                {
                    var set = _context.Set<TEntity>();
                    TEntity attachedEntity = set.Find(ID);  // You need to have access to key

                    if (attachedEntity != null)
                    {
                        var attachedEntry = _context.Entry(attachedEntity);

                        attachedEntry.CurrentValues.SetValues(entity);
                        this._context.SaveChanges();
                    }
                    else
                    {
                        entry.State = EntityState.Modified; // This should attach entity
                    }
                }
            }
            catch (DbEntityValidationException dbEx)
            {
                var msg = string.Empty;

                foreach (var validationErrors in dbEx.EntityValidationErrors)
                    foreach (var validationError in validationErrors.ValidationErrors)
                        msg += Environment.NewLine + string.Format("Property: {0} Error: {1}", validationError.PropertyName, validationError.ErrorMessage);

                var fail = new Exception(msg, dbEx);
                //Debug.WriteLine(fail.Message, fail);
                throw fail;
            }
        }

        /// <summary>
        /// Gets the primary key.
        /// </summary>
        /// <param name="entry">The entry.</param>
        /// <returns></returns>
        private int GetPrimaryKey(DbEntityEntry entry)
        {
            var myObject = entry.Entity;
            var property =
                myObject.GetType()
                     .GetProperties().FirstOrDefault(prop => Attribute.IsDefined(prop, typeof(KeyAttribute)));
            return (int)property.GetValue(myObject, null);
        }

        /// <summary>
        /// Deletes the specified entity.
        /// </summary>
        /// <param name="entity">The entity.</param>
        /// <exception cref="System.ArgumentNullException">entity</exception>
        public void Delete(TEntity entity)
        {
            try
            {
                if (entity == null)
                    throw new ArgumentNullException("entity");

                this.Entities.Remove(entity);

                this._context.SaveChanges();
            }
            catch (DbEntityValidationException dbEx)
            {
                var msg = string.Empty;

                foreach (var validationErrors in dbEx.EntityValidationErrors)
                    foreach (var validationError in validationErrors.ValidationErrors)
                        msg += Environment.NewLine + string.Format("Property: {0} Error: {1}", validationError.PropertyName, validationError.ErrorMessage);

                var fail = new Exception(msg, dbEx);
                //Debug.WriteLine(fail.Message, fail);
                throw fail;
            }
        }

        /// <summary>
        /// Gets the table.
        /// </summary>
        /// <value>
        /// The table.
        /// </value>
        public virtual IQueryable<TEntity> Table
        {
            get
            {
                return this.Entities;
            }
        }

        /// <summary>
        /// Gets the entities.
        /// </summary>
        /// <value>
        /// The entities.
        /// </value>
        private IDbSet<TEntity> Entities
        {
            get
            {
                if (_entities == null)
                    _entities = _context.Set<TEntity>();
                return _entities;
            }
        }
    }
*****************
LM.Service
1.IService
public interface ILoginService
    {
        /// <summary>
        /// Gets the login.
        /// </summary>
        /// <param name="userName">Name of the user.</param>
        /// <param name="password">The password.</param>
        /// <returns></returns>
       Login GetLogin(string userName,string password);
      
    }
2.Service
 public interface ILoginService
    {
        /// <summary>
        /// Gets the login.
        /// </summary>
        /// <param name="userName">Name of the user.</param>
        /// <param name="password">The password.</param>
        /// <returns></returns>
       Login GetLogin(string userName,string password);
      
    }
***********************************

Friday, 31 October 2014

MVC Questions - 5

1. Explain MVC (Model-View-Controller) in general?

MVC (Model-View-Controller) is an architectural software pattern that basically decouples various components of a web application. By using MVC pattern, we can develop applications that are more flexible to changes without affecting the other components of our application.
  •  “Model”, is basically domain data.
  •  “View”, is user interface to render domain data.
  •  “Controller”, translates user actions into appropriate operations performed on model.

2. What is ASP.NET MVC?

ASP.NET MVC is a web development framework from Microsoft that is based on MVC (Model-View-Controller) architectural design pattern. Microsoft has streamlined the development of MVC based applications using ASP.NET MVC framework.

3. Difference between ASP.NET MVC and ASP.NET WebForms?

ASP.NET Web Forms uses Page controller pattern approach for rendering layout, whereas ASP.NET MVC uses Front controller approach. In case of Page controller approach, every page has its own controller i.e. code-behind file that processes the request. On the other hand, in ASP.NET MVC, a common controller for all pages processes the requests.
Follow the link for the difference between the ASP.NET MVC and ASP.NET WebForms.

4. What are the Core features of ASP.NET MVC?

Core features of ASP.NET MVC framework are:
  • Clear separation of application concerns (Presentation and Business Logic). It reduces complexity that makes it ideal for large scale applications where multiple teams are working.
  • It’s an extensible as well as pluggable framework. We can plug components and further customize them easily.
  • It provides extensive support for URL Routing that helps to make friendly URLs (means friendly for human as well as Search Engines).
  • It supports for Test Driven Development (TDD) approach. In ASP.NET WebForms, testing support is dependent on Web Server but ASP.NET MVC makes it independent of Web Server, database or any other classes.
  • Support for existing ASP.NET features like membership and roles, authentication and authorization, provider model and caching etc.
Follow for detailed understanding of above mentioned core features.

5. Can you please explain the request flow in ASP.NET MVC framework?

Request flow for ASP.NET MVC framework is as follows:
Request hits the controller coming from client. Controller plays its role and decides which model to use in order to serve the request. Further passing that model to view which then transforms the model and generate an appropriate response that is rendered to client.
ASP.NET MVC Request Flow

6. What is Routing in ASP.NET MVC?

In case of a typical ASP.NET application, incoming requests are mapped to physical files such as .aspx file. On the other hand, ASP.NET MVC framework uses friendly URLs that more easily describe user’s action but not mapped to physical files. Let’s see below URLs for both ASP.NET and ASP.NET MVC.
//ASP.NET  approach – Pointing to physical files (Student.aspx)
//Displaying all students
http://locahost:XXXX/Student.aspx

//Displaying a student by Id = 5

http://locahost:XXXX/Student.aspx?Id=5

//ASP.NET MVC approach – Pointing to Controller i.e. Student
//Displaying all students
http://locahost:XXXX/Student

//Displaying student by Id = 5

http://locahost:XXXX/Student/5/
ASP.NET MVC framework uses a routing engine, that maps URLs to controller classes. We can define routing rules for the engine, so that it can map incoming request URLs to appropriate controller. Practically, when a user types a URL in a browser window for an ASP.NET MVC application and presses “go” button, routing engine uses routing rules that are defined in Global.asax file in order to parse the URL and find out the path of corresponding controller. You can find complete details of ASP.NET MVC Routing here.

7. What is the difference between ViewData, ViewBag and TempData?

In order to pass data from controller to view and in next subsequent request, ASP.NET MVC framework provides different options i.e. ViewData, ViewBag and TempData.
Both ViewBag and ViewData are used to to communicate between controller and corresponding view. But this communication is only for server call, it becomes null if redirect occurs. So, in short, its a mechanism to maintain state between controller and corresponding view. ViewData is a dictionary object while ViewBag is a dynamic property (a new C# 4.0 feature). ViewData being a dictionary object is accessible using strings as keys and also requires typecasting for complex types. On the other hand, ViewBag doesn’t have typecasting and null checks.
TempData is also a dictionary object that stays for the time of an HTTP Request. So, Tempdata can be used to maintain data between redirects i.e from one controller to the other controller.ViewData Vs ViewBag Vs TempData
You can easily find detailed examples for implementation of ViewBag, ViewData and TempData here.

8. What are Action Methods in ASP.NET MVC?

As I already explained about request flow in ASP.NET MVC framework that request coming from client hits controller first. Actually MVC application determines the corresponding controller by using routing rules defined in Global.asax. And controllers have specific methods for each user actions. Each request coming to controller is for a specific Action Method. The following code sample, “ShowBook” is an example of an Action Method.
  public ViewResult ShowBook(int id)
  {
           var computerBook = db.Books.Where(p => P.BookID == id).First();
           return View(computerBook);
  }
Action methods perform certain operation using Model and return result back to View. As in above example, ShowBook is an action method that takes an Id as input, fetch specific book data and returns back to View as ViewResult. In ASP.NET MVC, we have many built-in ActionResults type:
  • ViewResult
  • PartialViewResult
  • RedirectResult
  • RedirectToRouteResult
  • ContentResult
  • JsonResult
  • EmptyResult
  • and many more….
For a complete list of available ActionResults types with Helper methods, please click here.
Important Note: All public methods of a Controller in ASP.NET MVC framework are considered to be Action Methods by default. If we want our controller to have a Non Action Method, we need to explicitly mark it with NonAction attribute as follows:
[NonAction]
public void MyNonActionMethod() { ….. }

9.Explain the role of Model in ASP.NET MVC?

One of the core feature of ASP.NET MVC is that it separates the input and UI logic from business logic. Role of Model in ASP.NET MVC is to contain all application logic including validation, business and data access logic except view i.e. input and controller i.e UI logic.
Model is normally responsible for accessing data from some persistent medium like database and manipulate it, so you can expect that interviewer can ask questions on database access topics here along with ASP.NET MVC Interview Questions.

10.What are Action Filters in ASP.NET MVC?

If we need to apply some specific logic before or after action methods, we use action filters. We can apply these action filters to a controller or a specific controller action. Action filters are basically custom classes that provide a mean for adding pre-action or post-action behavior to controller actions.
For example,
  • Authorize filter can be used to restrict access to a specific user or a role.
  • OutputCache filter can cache the output of a controller action for a specific duration.

Sunday, 12 October 2014

MVC Questions - 4

1.ViewData vs ViewBag vs TempData vs Session

ViewData

  1. ViewData is a dictionary object that is derived from ViewDataDictionary class.
    1. public ViewDataDictionary ViewData { get; set; }
  2. ViewData is a property of ControllerBase class.
  3. ViewData is used to pass data from controller to corresponding view.
  4. It’s life lies only during the current request.
  5. If redirection occurs then it’s value becomes null.
  6. It’s required typecasting for getting data and check for null values to avoid error.

ViewBag

  1. ViewBag is a dynamic property that takes advantage of the new dynamic features in C# 4.0.
  2. Basically it is a wrapper around the ViewData and also used to pass data from controller to corresponding view.
    1. public Object ViewBag { get; }
  3. ViewBag is a property of ControllerBase class.
  4. It’s life also lies only during the current request.
  5. If redirection occurs then it’s value becomes null.
  6. It doesn’t required typecasting for getting data.

TempData

  1. TempData is a dictionary object that is derived from TempDataDictionary class and stored in short lives session.
    1. public TempDataDictionary TempData { get; set; }
  2. TempData is a property of ControllerBase class.
  3. TempData is used to pass data from current request to subsequent request (means redirecting from one page to another).
  4. It’s life is very short and lies only till the target view is fully loaded.
  5. It’s required typecasting for getting data and check for null values to avoid error.
  6. It is used to store only one time messages like error messages, validation messages. To persist data with TempData refer this article: Persisting Data with TempData

Session

  1. Session is an object that is derived from HttpSessionState class.
    1. public HttpSessionState Session { get; }
  2. Session is a property of HttpContext class.
  3. Session is also used to pass data within the ASP.NET MVC application and Unlike TempData, it never expires.
  4. Session is valid for all requests, not for a single redirect.
  5. It’s also required typecasting for getting data and check for null values to avoid error.

 

2. Controllers and Actions in ASP.NET MVC


Action Results Listing

  • View():- It represents an ASP.NET MVC view i.e. when you return HTML to the browser and it is the most common ActionResult returned by a Controller.
  • PartialView():- A fragment of an ASP.NET MVC view.
  • RedirectToAction():- Redirect from one controller action to a second controller action. Possible parameters that you can use with the RedirectToAction() methods are
    • actionName: The name of a controller action.
    • controllerName: Name of a Controller.
    • routeValues: The values passed to the action.
    • E.g.:
      return RedirectToAction("Index",Testing);
      return RedirectToAction("Testing2", new {id="pijush"});
      The RedirectToAction() method returns a 302 found HTTP status code to the browser to perform the redirect to the new action.One advantage of performing a browser redirect is that it updates the browser address bar with the new URL. The disadvantage is that a browser must do a second request.
  • Redirect():- Redirection to another controller action or URL.
  • Content():- Raw content sent to the browser. There are multiple overloads of the Content() method. All the parameters are mentioned below that you can pass as an argument
    • string: The string to render to the browser.
    • contentype: The MIME type of the content (defaults to text/html).
    • contentEncoding: The text encoding of the content (e.g.:-Unicode or ASCII)
  • Json():- JavaScript object Notation (JSON) was invented by Douglas Crockford as a lightweight alternative to XML appropriate for sending data across the internet in Ajax application. E.g :- You can convert a set of database records into a JSON representation and pass the data from the server to the browser. The Json() method uses a class in the .NET framework called the JavaScriptSerializer to serialize an object into a JSON representation.
public ActionResult List()
{
    var val = new List<string>
             {
                 "AAA",
                 "BBB",
                 "CCC"
             };
             return Json(val);
} 

JSON representation :- ["AAA","BBB","CCC"]  
Json() method has several overloads and supports the following parameters are
  • data: The content to serialize.
  • contentType: The MIME type of the content (default to application/json).
  • contentEncoding: The text encoding of the content(e.g. Unicode or ASCII).
  • File():- Return a file from an action. E.g.: image file, word file etc.This method accepts the following parameters which are mentioned here: filename, contentType, fileDownloadName, fileContents [instead of providing the path to the file to download, you can provide the actual file contents as a byte array], fileStream.
  • JavaScript():- Represents a JavaScript file.

3. Passing data from one controller to another in ASP.NET MVC

At times you need to pass data from an action method belonging to one controller to an action method belonging to another controller. There are three ways to accomplish this task. They are:
  • Pass data as query string parameters
  • Pass data in TempData dictionary
  • Pass data as route parameters
 Let's quickly see how each of these three approaches work.

Pass data as query string parameters

This approach is possibly the most primitive one and involves no special consideration from your side. The action method sending the data can use Redirect() method or RedirectToAction() method to transfer the control to the receiving action method. The following code shows how this is done:
public ActionResult Index()
{
    Customer data = new Customer()
    {
        CustomerID = 1,
        CustomerName = "Abcd",
        Country = "USA"
    };
    string url=string.Format("/home2/index?customerid={0}
                             &customername={1}&country={2}",
                             data.CustomerID,data.CustomerName,data.Country);
    return Redirect(url);
}
The above code shows Index() action from Home1 controller. The Index action method instantiates Customer object - the model class - that looks like this:
public class Customer
{
    public int CustomerID { get; set; }
    public string CustomerName { get; set; }
    public string Country { get; set; }
}
It then forms a URL pointing to the Index() action from Home2 controller. Notice how data from Customer object is transferred in the form of query string parameters. In the above example there is no logic for generating model data but in a more realistic case you may have such a logic in this method. And once the data is generated you can pass it to the another controller using query string. The Redirect() method then takes the control to the Index() action of Home2 controller.
The Index() action of Home2 can receive the data as shown below:
public ActionResult Index()
{
    Customer data = new Customer();
    data.CustomerID = int.Parse(Request.QueryString["CustomerID"]);
    data.CustomerName = Request.QueryString["CustomerName"];
    data.Country = Request.QueryString["Country"];
    return View(data);
}
As you can see Request.QueryString collection is being used to read the values passed in the query string. Once a Customer object is formed, it is passed to the Index view.
This technique has an advantage that it is quite simple and requires no additional configuration. However, it's bit crude technique and you should avoid it if any of the other techniques can be used.

Pass data using TempData dictionary

In this technique you store the data to be passed in the TempData dictionary in the sender action method. The receiving action method reads the data from the TempData dictionary. You might be aware that TempData dictionary can hold data till it is read and this can carry data across multiple requests. The following code shows how this is done:
public ActionResult Index()
{
    Customer data = new Customer()
    {
        CustomerID = 1,
        CustomerName = "Abcd",
        Country = "USA"
    };
    TempData["mydata"] = data;
    return RedirectToAction("Index", "Home2");
}
As you can see Index() action instantiates a Customer object as before. This time, however, it stores the Customer object in a TempData key named mydata. The RedirectToAction() method is then used to take the control to the Index() action of Home2 controller.
Inside the Index() of Home2, you can read the value as follows:
public ActionResult Index()
{
    Customer data = TempData["mydata"] as Customer;
    return View(data);
}
The above code reads the Customer object from TempData dictionary and passes it to the Index view.
The TempData technique doesn't require any additional setup but it requires that session state be enabled. Also, TempData is designed to store arbitrary pieces of data. If you are planning to send model objects through TempData, that may be a deviation from standard design practices.

Pass data as route parameters

In this technique you need to do an additional work of defining a route in the system. For example, if you wish to pass the Customer data in the form of route parameters you need to define a route like this:
routes.MapRoute(
    name: "Default2",
    url: "{controller}/{action}/{customerid}/{customername}/{country}",
    defaults: new { controller = "Home2", action = "Index" }
);
As shown above, the route includes {customerid}, {customername}, and {country} route parameters and the route is mapped with Index() action of Home2 controller. Once the above configuration is done you can pass data from the sender action as follows:
public ActionResult Index1()
{
    Customer data = new Customer()
    {
        CustomerID = 1,
        CustomerName = "Abcd",
        Country = "USA"
    };
    return RedirectToAction("Index", "Home2", data);
}
Notice that, this time the Customer object is passed as the third parameter of RedirectToAction() method. This way Customer data will be passed in the form of route parameter values. To receive this data the receiver action method should write something like this:
public ActionResult Index()
{
    Customer data = new Customer();
    UpdateModel(data);
    return View(data);
}

// OR

public ActionResult Index(Customer data)
{
    return View(data);
}
As shown above you can either use UpdateModel() method to transfer values from the route to the Customer object or you can have a parameter to the Index() action method.
This technique is quite clean and makes use of MVC specific parts (route and route parameters). It doesn't have any dependency on session state as in the case of TempData technique. On the other hand you need to create a route to deal with the route parameters.

Note about query string and route parameters

Before I conclude this post, it would be interesting to see a small thing about how RedirectToAction() deals with query string and route parameters.
Let's assume that your sender action is like this:
public ActionResult Index()
{
    Customer data = new Customer()
    {
        CustomerID = 1,
        CustomerName = "Abcd",
        Country = "USA"
    };
    return RedirectToAction("Index", "Home2", data);
}
Notice that RedirectToAction() method passes Customer data object to Index() of Home2 as the third parameter.
The interesting thing to note is - If you haven't defined any route to match the data MVC sends it as query string. And if you have defined a route, it passes the values as route parameters. You can confirm this by observing the browser address bar once the Index() of Home2 renders the view. The following figure shows the difference:

That also means in the query string technique discussed earlier, you could have used exactly same code in the receiving action as in the case of route parameter technique.
In addition to the three techniques discussed above you can also use Session object but that's not discussed here separately since TempData technique anyway depends on the session storage.

 

 

Tuesday, 1 July 2014

HCLINT & LInks

1.Bundle
2.Filter
3.How to fill grid
4.Can we use viewbag/viewdata in javascript
5.Authorization

*******************


1.Addvantage of MVC as compare ASP.net
2.Jquery diff find/search
3.Model apporach
4.foreach loop in jquery
5.Database design
6.What's in new in MVC4
7.Benfits of Razor

********************

1.MVC life Cycle
2.difference between ienumerable and ienumerator
3.Routing
4.Model binding
5.Post and Pre action
6.How will send data from controller to View
7.How you will bind view with tiddly coupled interface
8.dependency injection.

http://www.asp.net/mvc/overview/older-versions/getting-started-with-ef-5-using-mvc-4/implementing-the-repository-and-unit-of-work-patterns-in-an-asp-net-mvc-application

http://www.c-sharpcorner.com/UploadFile/1492b1/generic-repository-pattern-in-mvc3-application-with-entity-f/

http://techbrij.com/generic-repository-unit-of-work-entity-framework-unit-testing-asp-net-mvc

http://onlinedotnet.com/materials/

http://www.dotnetanalyst.com/faqs/mvc.aspx

http://onlinedotnet.com/asp-net-mvc-interview-questions-and-answers/

http://sampathloku.blogspot.in/2013/05/top-10-new-features-in-aspnet-mvc-4.html

https://curah.microsoft.com/105801/aspnet-mvc-interview-questions-and-answers

http://www.webdevelopmenthelp.net/2013/09/7-jQuery-Code-Snippet.html

http://abundantcode.com/category/asp-net/

http://www.codeproject.com/Articles/717941/How-to-Choose-the-Best-Way-to-Pass-Multiple-Models

http://www.codeproject.com/Articles/728146/ASP-NET-MVC-bundles-internals

http://www.dotnet-tricks.com/Tutorial/mvc/c72b040113-Asp.net-MVC-4-performance-optimization-with-bundling-and-minification.html

http://www.codeproject.com/Articles/644605/CRUD-Operations-Using-the-Repository-Pattern-in-MV

http://www.codeproject.com/Articles/688929/Repository-Pattern-and-Unit-of

http://www.youtube.com/watch?v=prlhfiFe-4s

http://www.codeproject.com/Articles/683942/An-Absolute-Beginners-Tutorial-for-understanding-E