Wriju's BLOG

.NET, Cloud and everything

Entity Framework CodeFirst : Simple Migrations

When I change my model from let’s say //Employee Entity public class Employee { public int Id { get; set; } public string FullName { get; set; } } to //Employee Entity public class Employee { public int Id { get; set; } public string FullName { get; set; } public string Email { get;… Read more

Entity Framework CodeFirst : Where is my database

Sometime back I was trying out on CodeFirst and I suddenly realized that the generated database by CodeFirst is missing. I had to see in SSMS what exactly got generated. So I did a trick to retrieve the database information //Employee Entity public class Employee { public int Id { get; set; } public string… Read more

Resources on ADO.NET Entity Framework 6

New Features in EF6 These are some of the more notable new features in EF6. For a complete list of changes see Version History. Async Query & Save (EF Designer & Code First)Asynchronous query and save using the async and await keywords. Connection Resiliency / Retry Logic (EF Designer & Code First)Automatically retry any commands… Read more

Visual Studio Online How to get more user licenses

In production there will be more users than your testing or POC projects. The cost associated per user is mentioned here http://www.visualstudio.com/products/visual-studio-online-overview-vs  This is how we can increase them refer http://www.visualstudio.com/get-more-user-licenses-vs Namoskar!!!… Read more

Book Review : Developing Windows Store Apps with HTML5 and JavaScript

While I was reading Developing Windows Store Apps with HTML5 and JavaScript, written by Rami Sarieddine, was enjoying it fully. I am a HTML5/JS guy when it comes to Windows Store Apps. When I got this opportunity to review this book I was very excited. Because I would get a chance to learn during this… Read more

Free EBook from Microsoft

Lync Microsoft Lync Server 2013 Step by Step for Anyone Office Deployment guide for Office 2013 First Look: Microsoft Office 2010 Microsoft Office 365: Connect and Collaborate Virtually Anywhere, Anytime Microsoft Office 365 for professionals and small businesses: Help and How To Security and Privacy for Microsoft Office 2010 Users SharePoint Explore SharePoint 2013 Deployment… Read more

Windows Azure Storage Connection String

If you are not using Visual Studio Cloud Projects (where one cloud project and n-number of Web/Worker Role project(s)) and building simple WebSite, you may need this. This is the connection string you need in your Web.Config file under ConnectionStrings DefaultEndpointsProtocol=http;AccountName=[account_name];AccountKey=[account_key] After which you need to initiate by doing CloudStorageAccount csa = CloudStorageAccount.Parse(ConfigurationManager.ConnectionStrings["DataConnection"].ConnectionString); Namoskar!!!… Read more

Windows Azure Table Storage

Windows Azure Table has changed quite a bit since SDK 1.x. So there are buch of new approaches and ways to handle them First we need to install WindowsAzure.Storage from http://nuget.org Now have the entity public class Employee : TableEntity{ public Employee() { this.PartitionKey = "emp"; this.RowKey = Guid.NewGuid().ToString(); } public string FullName { get;… Read more

Team Foundation Server 2013 : Books Free and Paid

Professional Team Foundation Server 2012 (free e-book plus link to purchase hardcover book) Testing for Continuous Delivery with Visual Studio 2012 (links to free e-book and purchase paperback) Install Team Foundation Server 2012: the ultimate guide for installing TFS (free e-book in many formats) Upgrade Team Foundation Server 2012: the ultimate upgrade guide (free e-book… Read more

Team Foundation Server 2013 : Learning Videos

Modern Application Lifecycle Management (1 hour, 11 minutes) What’s New for ALM in Visual Studio 2013 and Team Foundation Server 2013 (1 hour, 18 minutes) Climbing the Agile Testing Ladder featuring Visual Studio 2013, TFS 2013, Microsoft Test Manager 2013, and Lab Management 2013 (1 Hour, 10 minutes) Namoskar!!!… Read more

Visual Studio 2013 : New enhanced scroll bar #7

You will not imagine unless you play with this feature. Scrollbar was never a charm like this After you do this your scrollbar would look like Also you may see the code preview in a popup Alternatively you can get them when you right click to a scroll bar Namoskar!!!… Read more

Visual Studio 2013 : Enhanced “Go to Definition” #3

F12 or Go to Definition is one of the most used features for developers. It was there in Visual Studio 2013 since very long. Now you can either select Alt+F12 or select “Peek Definition” After you select it You go on and on. After sometime you will find a blue breadcrumb Namoskar!!!… Read more

Build Windows Phone Apps using Windows Azure Mobile Services from Ground Up

Windows Phone 8 works really well with Window Azure Mobile Services. Windows Azure portal gives us the startup apps, however you can also build from ground up. Here it is, Let’s say you have created a Windows Azure Mobile Service Once it is ready Grab the URL and Key. After that create a blank Windows… Read more

Repository Pattern with ADO.NET Entity Framework Hack

Let’s build ADO.NET Entity Framework library using Repository Pattern. There are a many ways but this is probably the easiest hack.  First build a blank solution Then add a class library called “DAL” and add a class called “Employee” namespace DAL { public class Employee { public int Id { get; set; } public string… Read more

The beautiful MVVM

Getting Started with MVVM in 10 minutes   Building a Reusable ICommand implementation for Windows Phone MVVM apps   Laurent Bugnion, leads the MVVM Light Toolkit project, has a 4-article MSDN series on MVVM IOC Containers and MVVM Messenger and View Services in MVVM Maximizing the Visual Designer’s Usage with Design-Time Data Commands, RelayCommands and… Read more

ADO.NET Entity Framework : Executing TSQL and DbContext under same Transaction

There might be a requirement that we need to run a RAW SQL statement and DbContext update under same connection and would like to have the Transaction in place. Let’s see how we can achieve this easily SQL Table CREATE TABLE [dbo].[Emp]( [Id] [int] IDENTITY(1,1) NOT NULL, [FirstName] [varchar](50) NOT NULL, [LastName] [varchar](50) NULL, CONSTRAINT… Read more

Windows Azure Mobile Services : Adding and Filtering Authenticated User in Table

When you authenticate you Mobile apps using Windows Azure Mobile Services you may want to add the user id in your table row. This way you can later filter them while reading. This sandbox filing would give a portal experience to the end user. Now this can be done at the client level but the… Read more

Office 365 is free for NGO

It’s a channel and to know more about it visit http://www.microsoft.com/en-us/news/Press/2013/Sep13/09-10Office365NonprofitsPR.aspx Microsoft Corp. on Wednesday announced the global availability of Office 365 for Nonprofits for qualifying nonprofits and nongovernmental organizations (NGOs) through its software donation program. The donation is available immediately in 41 countries around the world and for up to 90 countries by July… Read more

Using Repository Pattern in Entity Framework

One of the most common pattern is followed in the world of Entity Framework is “Repository Pattern”. Since this is something which is heavily used and being practiced, I am not going to talk about the core pattern. Rather, try to show how one can implement it. Objectives As mentioned in http://msdn.microsoft.com/en-us/library/ff649690.aspx You want to… Read more

Patterns and Practices : Dependency Injection with Unity–Just Released

Just Released!!! Patterns and Practices guidance on Dependency Injection with Unity     PDF   EPUB   MOBI   HARD COPY   Inside the guide: Foreword by Chris Tavares Chapter 1 – Introduction Chapter 2 – Dependency Injection Chapter 3 – Dependency Injection with Unity Chapter 4 – Interception Chapter 5 – Interception using Unity… Read more

Microsoft Patterns and Practices Guidance on Solution Development Fundamentals

  Enterprise Library. Enterprise Library is a collection of application blocks that address common cross-cutting concerns that developers face when developing applications. The latest version of Enterprise Library (version 6) was released in April 2013 and includes two new application blocks (Semantic Logging Application Block and Transient Fault Handling Application Block) and many improvements. The… Read more

Windows Phone Security : Encrypt and Decrypt

Often times you may want to secure the user data. However, there is one native API to support using System.Security.Cryptography; using System.Text; byte[] secretPassword; // to store it in a variable private void btnEncrypt_Click(object sender, RoutedEventArgs e) { //Convert the text to byte[] byte[] clearPassword = Encoding.UTF8.GetBytes(txtData.Text); //Encrypt secretPassword = ProtectedData.Protect(clearPassword, null); txtDecryptText.Text = "Encrypted…";… Read more

Windows Phone Storing string in Application Setting

For small key-value pair like storage we can use Application Setting and store the string. It is simple and easy to retrieve. // Storing the data in Application Settings private void btnSave_Click(object sender, RoutedEventArgs e) { IsolatedStorageSettings.ApplicationSettings["TheName"] = txtName.Text; IsolatedStorageSettings.ApplicationSettings.Save(); //Important to call to Save it } //Getting the data from Application Settings private void… Read more

Windows Store Apps and SQLite for x86, x64 and ARM

There are bunch of resources on how to use SQLite. The one which I came across and liked is http://jesseliberty.com/2013/03/14/windows-8-storing-data-with-sqlite/. If you follow step by step you will be able to reach the desired output.    What is more challenging is the final package when you create for Windows Store. SQLite DLL compiles per platform…. Read more

Windows Phone Development Absolute Beginners Series

It is amazing series in Channel 9 demonstrating the Windows Phone Development step by step. Watch it here https://channel9.msdn.com/Series/Windows-Phone-8-Development-for-Absolute-Beginners Also the source code and instruction manual is available at Source Code: https://aka.ms/absbeginnerdevwp8 PDF Version: https://aka.ms/absbeginnerdevwp8pdf Namoskar!!!… Read more

Learn ASP.NET 4.5 through Scott Hanselman

Scott is delivering ASP.NET 4.5, what could be more exciting!!! Mod 01: What’s New in ASP.NET 4.5 Mod 02: Building and Deploying Websites with ASP.NET MVC 4 Mod 03: Creating HTML5 Applications with jQuery Mod 04: Building a Service Layer with ASP.NET Web API Mod 05: Leveraging Your ASP.NET Development Skills to Build Office Apps… Read more

Windows Azure Storage 2.0 Changes

There are quite a few changes in Storage Library since SDK 1.8. Here are few resources on this Introducing Windows Azure Storage Client Library 2.0 for .NET and Windows Runtime Windows Azure Storage Emulator 1.8 Windows Azure Storage Client Library 2.0 Breaking Changes & Migration Guide Known Issues for Windows Azure Storage Client Library 2.0… Read more

Connecting and Managing MySQL of Windows Azure

Windows Azure provides the MySQL database but unfortunately we do not have any portal feature to work with the MySQL database associated with the Windows Azure WebSite. There is always a way, Let’s assume I have created a WebSite which has MySQL. For example I have created the website from gallery and selected the WordPress… Read more

Windows Azure Tools Error “IISConfigurator.exe has stopped working”

I started getting this error after I had one Web Platform Installer download issue while updating my Windows Azure SDK 2.0. So I had uninstalled all the Windows Azure component from my control panel and was still getting “IISConfigurator.exe has stopped working”. I was trying a many things but some how when I changed the… Read more

Windows Azure Storage Explorer in Visual Studio 2012

After installing the new Windows Azure SDK 2.0 I am happy to see this new Server Explorer component which lets me connect and manipulate Windows Azure Storage Component. After I click there, I am able to associate the same management certificate which I have used to connect my Visual Studio 2012 for deployment. After I… Read more

Entity Framework CodeFirst Calling Find does Top 2

While using ADO.NET Entity Framework’s CodeFirst and we call Find() method against the PrimaryKey field we get one record. But surprisingly if we dig deeper we will be able to see that it is calling Top 2 which means actually getting two rows. Why is it so? Because just to track if there are more… Read more

Scott Guthrie Discusses Windows Azure SDK 2.0

Scott Guthrie Discusses Windows Azure SDK 2.0 https://channel9.msdn.com/Shows/Cloud+Cover/Episode-106-Scott-Guthrie-Discusses-Windows-Azure-SDK-20 Read this yet another amazing blog post http://weblogs.asp.net/scottgu/archive/2013/04/30/announcing-the-release-of-windows-azure-sdk-2-0-for-net.aspx Namoskar!!!… Read more

GIDS 2013 Windows Phone 8 Developer Tips and Tricks Samples and Readings

Thank you. Thank you. Thank you!!! Samples Used for Demo Speech Synthesizer, Windows Azure and Chat, Windows Phone 8 Specific Demos At SkyDrive http://sdrv.ms/139QFaN (This is active till May 30, 2013) Windows Phone Toolkit and Sample https://aka.ms/wp8toolkit Azure Chat Service http://gids.cloudapp.net/ (available till May 30, 2013) Readings and Past recordings Complete end-to-end feature demo done… Read more

Great Indian Developer Summit 2013 : Windows Store App Development Hands on Lab

I am very excited for the Hands on Lab Workshop tomorrow at Great Indian Developer Summit. Windows Store App Development Hands on Lab May 7 2013, 12.15 to 16.00 (Indian Standard Time) at Hall C. By Goutham Upadhyaya (@goupadhy) & Wriju Ghosh (twitter @wriju_ghosh), Partner Consultant, Microsoft Corp, India Find more at http://www.developermarch.com/developersummit/session.html?insert=gouthamtut1  Some prerequisite,… Read more

GIDS 2013 Windows Phone 8 New Features and Tips & Tricks for Developers

I am happy to announce here that I will be delivering another Windows Phone 8 session in this GIDS 2013. Session Title: Windows Phone 8 New Features and Tips & Tricks for Developers Date and Time: May 9, 2013 14:50 to 15:50 (Indian Standard Time) Presenters: Ujjwal Kumar (Twitter @ujjwalk), Technical Evangelist, Microsoft Corp, India… Read more

GIDS Windows Store Apps Workshop

On May 7th I and Goutham will be delivering 3 hour workshop on Windows Store Apps both in XAML and in HTML at Great Indian Developer Summit. Keep watching this space for more information Abstract Developing Windows Store App in both XAML/C# and HTML/JS has been so easy. This is a series of eight hands-on… Read more

Windows Store App displaying Data in two more columns in ListView

Windows Store apps comes with some amazing data bound controls. The most favorite among them is ListView and GridView. The ListView shows data in vertical scrolling mode and GridView shows data in horizontal scrolling. My pal was building an app where she needs to display data in two columns while having the vertical scrolling enabled…. Read more

Windows Phone Adding Rating Button in Apps

Often times as a developer we get motivated to see ratings being given to our Windows Phone apps. However, this is possible only when one downloads and installs it in the Phone from Marketplace/Store. I was not aware that the app list (not the desktop) has the context menu to rate, earlier to that I… Read more

Windows Phone Emulator Orientation is not working

Another classic problem of Windows Phone emulator is that it does not respond as expected if we have the support for both the orientations (Portrait & Landscape) by mentioning it still not changing in Emulator. What could be the reason, think? It is because you have removed the On-Screen keyboard by pressing Ctrl+Page Up (I… Read more

Windows Phone : How to use PC keyboard in Emulator

In Windows Phone when we use PC emulator and launch app there we could type using mouse through the onscreen keyboard. However, this is not very convenient and we would like to use our own keyboard while typing. So its very simple, to disable the on screen keyboard you need to press Ctrl+Page Up, to… Read more

Is my PC can install Windows Phone 8 SDK and Emulator

Most PC can run Windows Phone 8 SDK but Emulator will not be installed properly if the below specification is not available Download CoreInfo from http://technet.microsoft.com/en-us/sysinternals/cc835722 Run "coreinfo -v" in command If * is there after EPT Good – is there after EPT Will not work Good Is not ready Namoskar!!!… Read more

Windows 8 App Review : Learning Alphabet

Here is my first review of one Windows 8 App which is created by my love Saswati Sanyal called “Learning Alphabet”. This is a very simple app which lets small little children learn Alphabet with zero interaction. This helps a kid to go through as one go and then sit back and relax. This does… Read more

Windows Phone 8 Training Videos of Jump Start and Build 2012 with Training Kit Hands On Labs

There are a bunch of resources on Windows Phone 8 development for free. Windows Phone 8 Jump Start Recently we have the Jump Start and the full content is available at Channel9. Here is the list Mod 01a: Introducing Windows Phone 8 Development Part 1 Mod 01b: Introducing Windows Phone 8 Development Part 2 Mod… Read more