by David Loo | Jun 17, 2014 | C#, Mono
Recently I have been playing with Entity Framework on Linux using Mono and my database server is MS SQL 2014. When I attempt to add an entity I receive the “System.Data.Entity.Core.ProviderIncompatibleException was thrown” exception and the following message was displayed:
An error occurred accessing the database. This usually means that the connection to the database failed. Check that the connection string is correct and that the appropriate DbContext constructor is being used to specify it or find it in the application’s config file. See http://go.microsoft.com/fwlink/?LinkId=386386 for information on DbContext and connections. See the inner exception for details of the failure.
So I did some further investigation online and found the following post on how to work around it:
https://entityframework.codeplex.com/discussions/538142
(more…)
by David Loo | Jun 14, 2014 | C#, Mono
So you have been using Entity Framework on Visual Studio and now you would like to code in Linux using Mono and still be able to use Entity Framework. Well this post will give you some basic steps to setup your SQL server and Mono project to get a simple database going.
Setting SQL Express
Before we can go any further we need to have Microsoft SQL Server Express installed on a Windows server. For my own setup I already have a virtual machine with Windows Server 2012 running and SQL Server Express 2014 installed. It’s up to you to choose own setup, and it doesn’t have to be the same as mine.
Create Your SimpleDatabase
Now we need to create our test database on SQL Server by running the following SQL statement on your script editor of choice:
CREATE DATABASE SimpleDatabase

Now you should have a brand spanking new database created and ready to be populated with data. (more…)
by David Loo | May 31, 2014 | General
ChromeCast is now available in Australia for only $49 and current available at JB Hi Fi, Dick Smith and Google store. When it was released I had to buy one on the next day.
Connecting To Your TV
Connecting the device is very simple, you just plug it into one of your available HDMI ports at the back of the TV and if you have a USB port connect the USB to it so that it can power the ChromeCast. But if you don’t have a USB port on your TV you can use the power supply that came with it. I also like how it’s tucked away behind my TV so that it doesn’t use up space. (more…)
by David Loo | May 10, 2014 | jQuery, Web Development
If you are planning to use jQuery on your web page and there is already another version being used, to prevent any conflict between the two here is what you can do:
var j = jQuery.noConflict();// Do something with jQuery
j( "div p" ).hide();
// Do something with another library's $()
$( "content" ).style.display = "none";
The code above creates a new alias instead of jQuery called j and while the other library is using the $.
by David Loo | May 9, 2014 | Linux Development, Mono
Since the recent release of Ubuntu 14.04 I was surprised to see a new version of MonoDevelop, so I wanted to try creating an ASP.NET MVC 3 (Razor) project but it failed and threw the following exception:
System.IO.FileNotFoundException:Could not find file "/usr/lib/monodevelop/AddIns/MonoDevelop.AspNet.Mvc/Templates/Common/Index.cshtml".File name:'/usr/lib/monodevelop/AddIns/MonoDevelop.AspNet.Mvc/Templates/Common/Index.cshtml'
So while searching on the Internet for hours I found the following solution and hope this will solve your problem too. (more…)