in Extensions

Knockout Generator v1.0

Share on Facebook0Tweet about this on TwitterShare on LinkedIn0Share on Google+0Email this to someone

For a long time, I have been amazed by peaple that have been written nice and usable extensions to visual studio.
So I am giving it a shot!

I’m writing ALOT of knockout at the moment så why not write something that helps me out, I wrote a Visual studio extension that generates a knockout viewmodel from your C# or VB model.
The extension can be found here: Knockout Generator

Version 1.0:

I want to say thanks to Filip Ekberg who make a youtoube video on this version, Knockout Generator YouTube

Here is how it works, the plugin adds a new Context menu item to your .cs/.vb files. Right click on a .cs/.vb file that has public properties, click the new command ”Generate Knockout ViewModel”.

A new .js file will be added to the project with a Knockout ViewModel based on the .cs/.vb files content (properties)

Example from Foo.cs and Foo.vb:

Will generate:

Properties that is private will not be included.

Share on Facebook0Tweet about this on TwitterShare on LinkedIn0Share on Google+0Email this to someone

Write a Comment

Comment