So if I want to add an artist to my website, and I create a model that holds that and some additional details like:
namespace SuperMusic.Models
{
public artist NewArtist { get; set; }
public IEnumerable<RecordCompanies> RecordCompanies
{
get { //some code to populate possible record companies }
}
Now I can have a view to create a new artist and my model could populate a drop down of record companies that the artist can be associated with.
But in my controller, I have to define "New Artist". I believe there are two ways to do this:
newArtistModel.NewArtist = context.artist.Create();
newArtistModel.NewArtist = new artist();
Is one of these more correct than the other? Or is there actually a difference in code and one of these is incorrect?
Thanks again for answer my noob questions!