Bump!
I do have the exact same question for the same example. I'm trying to build javascript function on the server side based on the model's content. I can't figure out how to do inline JS functions with Razor.
returns: error CS0201: Seuls une assignation, un appel, un incrément, un décrément et des expressions d'objet new peuvent être utilisés comme instruction.
sorry for french error msg.