I have the following model:
namespace Site.Models.Country
{
public class Country
{
public string CountryCode { get; set; }
public string CountryName { get; set; }
public string CountryUrl { get; set; }
}
}
In a separate model folder for a different view and controller, I have a different model like this:
namespace Site.Models.Directory
{
public class DirectoryProfileView
{
public List<Country> Countries { get; set; }
public DirectoryProfileView()
{
this.Countries = new List<Country>(Country.GetCountryRegions());
}
}
}
Is it correct for me to use the Country model from a different model ? I tried adding using Site.Models.Country
;
However for the following to work:
public List<Country> Countries { get; set; }
I need to call by
public List<Country.Country> Countries { get; set; }
My two questions are:
Is this correct? I don't really want to be creating another model exactly like my first Country model.
Also, any feedback on my naming conventions would be appreciated too.