asp.net mvc 3 - Asp MVC3 one to many Create and View -


i can not figure out way create 1 many model in single view, ?

in model, include "many".

example

public class parent { public int parentid; }

public class child { public int childid; public int parentid; }

then create view model

public class parentviewmodel { parent p; ienumerable c; }

then iterate foreach(var child in model.c) on view


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -