Round Button Style in Windows Phone 8.1 RT


C# Interviews question asked on 18 November 2014

We have a two class defined named as A and B.

Case 1:

Ques: Which statement is correct Line1 or Line2?
Ans: Line 1.

Case 2:

Question: What will be the output of above statement?

Load All EntityTypeConfiguration Using Reflections In Entity Framework


Get Area, Controller and Action Name in ASP.NET MVC


Knockoutjs – Foreach

The foreach binding duplicates a section of markup for each entry in an array, and binds each copy of that markup to the corresponding array item.

How to use


Create Database With Entity Framework Using Migration in ASP.NET MVC 4

There are two ways of creating database with Entity Framework Code-First.

  • Using DatabaseInitialization
  • Using Migrations

1. Create new ASP.NET MVC 4 empty project as EFMigration.

2. After project created, install Entity-Framework package using Package Manager Console.

3. Add new class Person.cs in Model folder.

4. Create new folder Data in project and add new file EfDataContext.cs in Data folder.

5. Open Package Manager Console in Visual Studio and type enable-migrations in console. A new file Configuration.cs is created in Migrations folder.
Enable Migration in Package Manager Console6. To update database without adding migration, set AutomaticMigrationsEnabled = true in Configuration.cs file.

7. Add SQL CE connection string in Web.config .

8. Use update-database keyword in package manager console to update database.

9. DB.sdf database file created in App_Data Folder









You have successfully created database with migrations using Entity Framework. I hope you will find this post helpful. Thank you

Remove All Navigation Back in Windows Phone

Before using below function, you need to include Microsoft.Phone.Controls nampespace in your project.

Or, you can remove Navigation Backstack by your choice.

I hope you find this post helpful, Thanks for reading.

How To Get Data Using WebClient in Windows Phone 7/8

WebClient is a class that is used to download data from web services.

To use WebClient in your project,  you need to include System.Net.WebClient or System.Net namespaces.


DownloadStringCompleted is a delegate event for DownloadStringAsync, it will call when DownloadStringAsync completes.

Or, you can get response by using Lambda Expressions with DownloadStringCompleted.


I hope you find this post helpful, Thanks for reading.

Launch Location Setting From Your App in Windows Phone 8