c# - MVC5 model collection data type -


I have coded a C # MVC 5 internet application, and when working with the list, let me know about the model structure Have a question.

I have a MapCompany category and a MapLocation class. In the MapCompany category, a list .

When I make a MapLocation and I MapCompany , and after saving it to the database, when I MapCompany In the later stage, the list of MapLocation is empty.

list & lt; MapLocation & gt; Instead of using , do I need to use another archive type?

Thanks in advance

Its code is difficult to tell from here but the line which mapcompanies .mapLoations.add (...)

1) What to save is actually populate the map location in the database. 2) Unless you engage in pulling out related entities, the concerned institutions are lazy loads, unless you reference the data.

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -