I have an ASP.NET Core MVC application. I am using ASP.NET Identity for user management. Each user can log in to the application and have their own page where they can keep and modify their let's say favorite movies.
My problem is how to identify movies by the users?
My first guess was to add list of movies to the user class, but I feel like it is wrong since the User class should only contain data concerning identity.
class User : IdentityUser
{
public List<Movie> MovieList { get;set; }
}
My second thought was to add UserId to the Movie class but this feels like mixing models again... And that would make retrieving the data in controllers somewhat ugly...
class Movie
{
public string Title { get; set; }
public string Author { get; set; }
public string UserId { get; set; }
}
I am just beginning my adventure with ASP.NET so I am a bit confused here. What is the official correct way to add user data (not regarding identity) to user?