Creating Song Features

We have done with Genre, now we want to make a CRUD operation for Song feature.

Before we move to the controller and view class, we need to generate a model class for song.

Based on our database attributes, the constructor for model class shown below.

public class SongModel
{
    public SongModel()
    {
        Genres = new List<SelectListItem>();
    }

    public int Id { get; set; }
    public string Title { get; set; }
    public string Singer { get; set; }
    public int Year { get; set; }
    public string Writer { get; set; }
    [DisplayName("Genre")]
    public int GenreId { get; set; }
    public string GenreName { get; set; }
    public IEnumerable<SelectListItem> Genres { get; set; }
}

results matching ""

    No results matching ""