AndreyAkinshin / knockout-mvc

Power of Knockout.js for ASP.NET MVC
http://knockoutmvc.com
203 stars 125 forks source link

Add support for decompiling computed properties with DelegateDecompiler #4

Closed hazzik closed 11 years ago

hazzik commented 11 years ago

This allows to use computed properties without lambda-expressions, so now these properties are usable on server side too.

using DelegateDecompiler;

namespace KnockoutMvcDemo.Models
{
  public class HelloWorldModel
  {
    public string FirstName { get; set; }
    public string LastName { get; set; }

    [Computed]
    public string FullName
    {
      get { return FirstName + " " + LastName; }
    }
  }
}
AndreyAkinshin commented 11 years ago

Merge with work branch delegate-decompiler