Perhaps I am missing something from the Knockout.js tutorial, but I find it a clear violation of the DRY principle to re-declare a model in knockout that has already been declared in MVC. Is there a way I can use the same model without re-declaring it?
Share
You can serialize it as Json (using Json.NET). But you have to unwrap circular dependencies.
What we tend to do is manually serialize the objects and type information so that we only send to the browser the information necessary. But the browser can send back a model ( with the partial information) and the model binder will convert back to the C# model.