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
Post a Comment