I see developers are not that confident about usage of the mentioned interfaces. In this post, I am going to discuss basic differences among IEnumerable and IQueryable and in which scenario to use what
Yearly Archives: 2014
Refactoring the ASP.NET MVC Application to the Onion Architecture
We have refactored the application adhering to the onion architecture. Domain objects like Movie is at the center of the architecture and are the part of internal layers. The Infrastructure project in which we are working with database and database logics are part of the external layers. They depend on the centeral layers like core. UI or in this case the MVC application is also an external layer and depndes on the Core project. All layers are interacting to each other using the interfaces rather than the concrete definitions. You can very easily write Unit Test against the controllers using Fake or Mock without hitting the datbase. In future you can easily change data access technology from Enity Framework to something else without affecting the UI and the Core.
No connection string named ” could be found in the ASP.NET MVC application config file: Solved
While working on an ASP.NET MVC application I encountered the following error. It clearly says that some connection string is missing in the configuration file. Well I have refactored the application following the onion architecture and there is nothing related to database exist in the MVC project. Project structure looks like follows: The Entity FrameworkContinueContinue reading “No connection string named ” could be found in the ASP.NET MVC application config file: Solved”
Resolving Dependencies in ASP.NET MVC 5 using StructureMap
If you are using StructreMap to resolve the dependencies in the ASP.NET MVC 5 application then Steve Smith’s blog post Resolving Dependencies in ASP.NET MVC 5 with StructureMap can be a great help for you. I have followed Steve’s blog to use the StructureMap. I am summarizing the steps as follows: Using the Nuget PackageContinueContinue reading “Resolving Dependencies in ASP.NET MVC 5 using StructureMap”
Types of ASP.NET MVC Views
Type of ASP.NET MVC View depends on the way data being passed to it from Controller. There are three ways data can be passed to Views from Controller. They are as followsUsing ViewBag or ViewData
Using object of the model which is strongly typed
Using any dynamic type value
How to view the generated SQL Query of LINQ
Have you ever thought of viewing generated SQL query of LINQ you write? You may need the generated query for the debugging and the logging purposes. In this post let us see how to print the generated SQL query on the console. Let us consider you have written LINQ as follows: You can print theContinueContinue reading “How to view the generated SQL Query of LINQ”
Resolving Dependencies in ASP.NET MVC 5 using Unity Container
In this post you will learn to use UNITY Container to resolve dependecy in ASP.NET MVC 5 application.
Unable to index file: Permission Denied error in git add command
Git permission Denied error
Getting started with Code First Approach and Entity Framework Migrations Commands
In this post we will walk through basics of Entity Framework migration commands and learn about Code First Approach. Entity Framework allows you to create database from plain classes. You can model your domain into classes and subsequently database can be created or updated from the model using Entity Framework.
Getting Started with Git and GitHub
Read complete article on Falafel Blog Who is not talking about Git or GitHub? In one of our recent user group meetings, someone asked how many Pull Requests have you done so far in any of open source projects on GitHub. I realized many developers in the room were puzzled with the phraseContinueContinue reading “Getting Started with Git and GitHub”