Jimmy Engström


Pluralization for Entity Framework Core

2018-01-04 08:00:00 +0000

I recently started working with .NET Core and I didn’t like that Microsoft removed the automatic pluralization/singularization of classes and collection in Entity Framework Core. They did however give us the opportunity to hook in our own. This is talked about in this StackOverflow post

What you need to do is to add a couple of files to your Entity Framework Core project.

I created a folder named “Pluralize” and added a PluralizationService. I choose to modify the one Microsoft provided in previous versions of Entity Framework found here.
You can of course just create your own. These are the files I use:

This will automatically register MyPluralizer and it will be used the next time you update your Entity Framework model.

Hope this helps you and if you have any feedback, please contact me.

Setting up source control for a HoloLens Unity project

2016-09-19 08:00:00 +0000

Don't source control generated files

When source controlling your Unity HoloLens project there is no reason to save the generated code since it is generated =)
Unity won't replace some of the generated files so if you for example change icons/tiles in the Unity project, those part will not be replaced when generating the code again.
A good practice is to export to new folders every time.


There are only a couple of folders worth adding to source control.
When setting up your project for the first time, just add the .gitignore file from here:
That way only the important files will be controlled.
You can also do this when creating a new project on GitHub.

Setting up your project

Go to Edit -> Project Settings -> Editor
To make source control work hassle free, you should make sure version control has visible meta files (or hidden meta files, if you don't want to see them in Windows Explorer).
It will add a meta file for each asset in you project, this will make sure that only the asset and the meta files gets tagged as changed if you change an asset, otherwise the whole folder would be tagged as changed.
Also make sure Asset serialization -> Mode is set to "Force Text" this will make your source control handle diffs (text is easier to handle than binary-files.
Using the Hololens toolkit http://www.apeoholic.se/hololens/2016/07/27/setting-up-a-hololens-unity-project.html will change these settings for you.

Bluetooth && Azure IoT hub == IoT - Or how to rule billions of devices

2016-09-10 10:00:00 +0000

This is my presentation from NDC Oslo 2016. NDC was fantastic, really good conference for both speakers and attendees, I hope to come back next year.

Bluetooth && Azure IoT hub == IoT - Or how to rule billions of devices - Jimmy Engström from NDC Conferences on Vimeo.

The market totally explodes with new gadgets that can connect to tablets, pc’s and phones. In 2015 alone there were 3 billion Bluetooth devices manufactured. In this session I will show how you can take advantage of that and how to communicate with devices that are Bluetooth enabled. I will also show how to figure out undocumented devices and how to use Azure IoT hub to turn them into IoT devices.

Let us AllJoyn in the fun of IoT

2016-08-29 10:00:00 +0000

This is my presentation from NDC Oslo 2016. NDC was fantastic, really good conference for both speakers and attendees, I hope to come back next year.

Let us AllJoyn in the fun of IoT - Jimmy Engström from NDC Conferences on Vimeo.

There are billions of IoT Devices and almost as many ways to communicate with them. Alljoyn is a standardized way to talk to IoT devices. With the help of this standard the devices themself can tell you about and expose what functionality you can use. All these things are implemented in Windows 10, we will look at how you can find devices, how to communicate with them and how AllJoyn works.

Setting up a HoloLens Unity project

2016-07-27 10:00:00 +0000

You can create apps for HoloLens by using UWP (ordinary 2D apps), you can also make 3D apps by using tools like Unity.
This post will cover what you need to do to setup a Unity project to work on HoloLens.
I have had the opportunity to work with HoloLens for a while now and I should share some of my tips and tricks.

The Tools

You need Unity installed on your computer, follow the instructions here:
While you're at it, I would also recommend installing Visual Studio 2015 and the HoloLens emulator (not needed for this blog post).

Setting things up

Let's take a look at what you need to do to set everything up.
I will show a really simple way to do that.

Create new project

Start with creating a new Unity project.
Name it something, in my case I named it DemoProject
Unity will now create our world.


Microsoft also provides HoloToolkit, a library containing a lot of useful components you can use when building HoloLens apps, you also get a couple of menu items that automatically make the changes you need.
You can download it from HoloToolkit.azurewebsites.net (or from github).
This will show a list of files to be imported, just click Import and the installation will take care of everything,
Now you should see a menu item called HoloToolkit.
First delete the camera and then add the Camera.prefab in the HoloToolkit/Utilities/Prefabs folder, this camera is customized for holographic development.
In the HoloLens emulator you can move around using the aswd keys.
To enable the same behavior in the Unity player you can add ManualCameraControl.cs (HoloToolkit/Utilities/Scripts) to your camera.
To fix the scene (set the correct position of the camera amongst other things) click "Apply HoloLens Scene Settings".
Now save your scene and place it in a folder called Scenes (or whatever location you prefer).
Now click the "Apply HoloLens Project Settings" it will make sure the near plane is set to a good value and make sure Holographic is available in the project.
You will get a couple of questions you can just select yes and then restart the project (Unity will do that automatically).
Now you are all done, and it's time to create your holograms, but that will be the subject of another blog post.
If you want to know in detail what changes these scripts made , here is an excellent blog post .
You can also read more here