So im writing an application that has an upload Area for images..
What I would like to do is Dynamicallyi build a path for files that are to be uploaded.
The User would select a Client,Market,Project and Place ( all of these are Seperate Models )
I would like to build a View that Showed Clients( dropdown), Market (dropdown) and so on so i can then grab those values to place them on the Server under a directory in that name...
I do not know how to combine my models to get them all into a Single view, other then creating a partial view for every dropdown menu ( is this the right way to handle this ? )
Can anyone Help? - Thanks
EDITS :
Here is what i was thinking you ment i could throw into a Razor View ( givin i pass all of them somehow )
@model OilNGasWeb.Models.UserProfiles
@model OilNGasWeb.Models.UserInfo
@model OilNGasWeb.Models.UserData
@model OilNGasWeb.Models.Users
then some code beneath ... thats what you ment with Hierarchie?
what i was thinking is to include the IEnumerable<> in the model of say the Main Model Was Users
User Model
[Table("Users")]
public class UserProfiles
{
[Key]
[DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
public int UserId { get; set; }
public string UserName { get; set; }
public virtual ICollection<UserRoles> UsersRoless { get; set; }
public virtual ICollection<UserInfo> UsersInfos { get; set; }
public virtual ICollection<UserData> UsersDatas { get; set; }
public virtual ICollection<Users> Userss { get; set; }
then do partial views for each in the index view of Users...
Trying to think of a better concept ( if there is one ) sorry for making the question unclear