Generate unit tests for your code using Smart unit tests

Smart Unit Tests is a new feature in Visual Studio 2015, Smart Unit Tests helps developers to explore their .NET code to generate test data and a suite of unit tests. For every statement in the code, a test input is generated that will execute that statement. A case analysis...


Creating Unit Tests for ASP.NET MVC 6 Applications

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 details here. Unit testing class...


K-MUG User Group Meeting On 20th December - Kochi

Kerala Microsoft User Group (K-MUG) is conducting monthly UG meeting on 20th December 2014, Kochi Venue: Startup Village, Kinfra Hi-Tech Park, Kalamassery, Kochi, Kerala. Agenda 02:00 - 02:10 Community updates 02:10 - 02:50 C# 6.0 - New Features by Anuraj P 02:50 - 03:30 Object/Relational Impedance Mismatch by Aravindan M...


Command line scaffolding for ASP.NET 5

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 dependencies. Add “gen”: “Microsoft.Framework.CodeGeneration”, under...


How to use SQLite in ASP.NET 5

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 about how to use SQLite...


Expression Bodied Functions and Properties in C# 6.0

Expression bodied functions are another syntax simplification in C# 6.0. These are functions with no statement body. Instead, you implement them with an expression, similar to Lamda expressions. class Calculator { public int Add(int a, int b) => a + b; public int Subtract(int a, int b) => a -...


Verify Internet connection is available using C#

While reviewing some code, I found a snippet for checking internet connection, like this private static bool IsConnectedtoInternet() { bool IsConnectedtoInternet; try { using (WebClient client = new WebClient()) { using (client.OpenRead("http://www.microsoft.com")) { IsConnectedtoInternet = true; } } } catch { IsConnectedtoInternet = false; } return IsConnectedtoInternet; } I found...