asp.net mvc - How to use MVC5 scaffolding for with complex types in view model -
I'm using ASP.NET MVC5 to create an app. My visual model class is complex because it has some features that are a list of objects. I tried to create a 'creation' view for the following model using MVC scaffolding, but it is ignoring the object list attributes of my thoughts model ... see my visual model below ... only name, imagepath e.t.c. The band is not for generes.
Is there any way to use MVC5 scaffolding to create visual elements of objects in my visual model?
is there anybody The reason is that instead of creating IEnumerable & lt;> properties on your main VM, you created a class for BandGenresVM and BandLinksVM? I have to estimate that loft is not working - MVC does not see those properties as hair lists, but looks as complex objects.
Public class BandRegisterVM {[Key] Public int id {get; Set; } Public string name {get; Set; } Public string ImagePath {get; Set; } Public string description {get; Set; } Public IEnumerable & lt; BandGenreVM & gt; Bandgenes {receive; Set; } Public IEnumerable & lt; BandLinkVM & gt; Bandlinks {receive; Set; }}
Comments
Post a Comment