Creating Unit Tests for ASP.NET MVC 6 Applications

Standard

This post is about unit testing ASP.NET MVC 6 applications. Unlike MS Test, this post is using XUnit Framework, which is the currently used unit testing framework for ASP.NET 5 applications. Similar to TestMethod, XUnit uses Fact / Theory attributes. You can find more comparison read more →

Command line scaffolding for ASP.NET 5

Standard

Last K-MUG Session, there was a demo related to ASP.NET MVC scaffolding. This post is about scaffolding support in ASP.NET 5. This post uses K runtime for scaffolding, you can do it using Visual Studio 2015 Preview as well. Modify project.json, add “Microsoft.Framework.CodeGenerators.Mvc”: “1.0.0-*” under read more →

How to use SQLite in ASP.NET 5

Standard

SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. SQLite is the most widely deployed SQL database engine in the world. Most of the ASP.NET 5 tutorials / articles, SQL Server is used. In this post I am explaining read more →

Generate your database entities using T4 templates

Standard

Long back I wrote some post about code generation using T4 templates. This post is about generating database entities using T4 templates. This code is pretty straight forward, you are reading the app.config to get the connection string, connecting to db server using Sql Server read more →

CREATE DATABASE permission denied in database ‘master’ – SQL EXPRESS

Standard

Long back I wrote a post about Entity Framework Error – The underlying provider failed on Open. Yesterday some one told me, he is getting this error – CREATE DATABASE permission denied in database ‘master’, he is using an application pool with NETWORK SERVICE identity. read more →

How to execute a Stored Procedure with Entity Framework Code First

Standard

Recently I worked on a project, which I started as code first and then I forced to switch to Database first. This post is about executing procedures from EF code first.(This is an update version of this post Here is my class structure and procedures. read more →