O'Reilly logo

Getting Started with Knockout.js for .NET Developers by Andrey Akinshin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Developing a Knockout MVC application

In this section, we will take the HomeLibrary application from the previous chapter and update it with Knockout MVC. We will discuss how this approach can help us simplify an ASP.NET application and allow us to get rid of the client JavaScript code.

Adding the model

We will update the model from the HomeLibrary2 project, as seen in Chapter 3, Integrating Knockout.js in ASP.NET MVC Applications. The BookModel class will "be equal to the version from the old project:

namespace HomeLibrary3.Models
{
  public class BookModel
  {
    public int Id { get; set; }
    public string Title { get; set; }
    public string Author { get; set; }
    public int Year { get; set; }
  }
}

The LibraryModel will be a little easier than its previous version: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required