c# - MVC 5 Creating all elements of model that has one to one relationship with another model -
i've been searching , trying figure out on own while now, , haven't been successful, i'll see if can me out here...
i'm building mvc 5 web application ef 6 code-first. 'model1' contains single "public virtual 'model2'" (one 1 relationship). now, issue is:
i need able create model1 it's associated model2 in 1 view click of single "submit" button.
i need view 1 can open details model1 , add model2 it.
in other words: have company has address. users should able create new company related address, , separately, @ company details , add address if don't have 1 related them.
i've managed figure out editing existing address in company, haven't been able figure out other 2 things.
any appreciated. if necessary, can provide code explain situation more clearly. thanks!
Comments
Post a Comment