A Nerd's False Positive.

Fix: Unity3d InputText foreground color white in Android

Last week, I was creating an Android app using Unity. However, when I deployed the app to device, I noticed that foreground color of input control is in white color but renders as expected in Unity editor and in other platform targets.


Add the below style in AndroidManifest.xml file and the issue will be resolved.



Add GUID as primary key column in code-first migration

Last week, I was migrating an old ASP.NET MVC project and as part of that I decided to replace the identity column from auto-incremented numeric value to GUID values which looks more professional.

Below are the changes that you need to make to achieve this.

// in your model class.
public Guid Id { get; set; }

Run, Add-Migration command which generates your migration class and make below change:

// in your migration class.
AlterColumn("dbo.LoLChampionPickeds", "Id", c => c.Guid(nullable: false, identity: true, defaultValueSql: "newsequentialid()"));

That's it. Now do an Update-Database and your Id field will start using GUIDs.