locked
customize login page RRS feed

All replies

  • User475983607 posted

    Hi

    Are quite new on programming with MVC so are hoping you can help me with some guidelines

    I am making an tv-guide, where i have 5 tables (one for each channel) which i have presented in my view by entity framework.

    So now i i have one view for todays programs (all 5 channels) and 5 other views (where just the specific channel are shown)

    I would like to make an login function where you can login and customize which channels you would like to see (ex i just want to see channel one,two and three) this should you be able to save so the next time you login are shown the tableau  of just these 3 channels.. So my question is how i should go about to make this , any suggestions?

    / Mike

    Your question is about state management.  Use a cookie to persist the user's settings.  Simply read the cookie and direct the use to the correct login or login format. 

    https://msdn.microsoft.com/en-us/library/ms178194.aspx?f=255&MSPPError=-2147217396

    Monday, November 5, 2018 2:24 PM
  • User1520731567 posted

    Hi jedeje,

    I am making an tv-guide, where i have 5 tables (one for each channel) which i have presented in my view by entity framework.

    So now i i have one view for todays programs (all 5 channels) and 5 other views (where just the specific channel are shown)

    I would like to make an login function where you can login and customize which channels you would like to see (ex i just want to see channel one,two and three) this should you be able to save so the next time you login are shown the tableau  of just these 3 channels.. So my question is how i should go about to make this , any suggestions?

    I think you can design like this:

    Generally, When the user registers,they can choose the channel which they like.

    And then,these related data will be stored in record in database based on userId.

    So,each person's login page displays different channels based on the userId.

    Best Regards.

    Yuki Tao

    Wednesday, November 7, 2018 2:22 AM
  • User-271186128 posted

    Hi Mike,

    So now i i have one view for todays programs (all 5 channels) and 5 other views (where just the specific channel are shown)

    I would like to make an login function where you can login and customize which channels you would like to see (ex i just want to see channel one,two and three) this should you be able to save so the next time you login are shown the tableau  of just these 3 channels.. So my question is how i should go about to make this , any suggestions?

    From your description, the user and channels contain many to many relationship, you could refer this article to configure many to many relationship in EF.

    After user select channels, you could insert the relationship into the joining table.

    Then, when user login, you could load related channels based on the user information, more details about loading related entities, please check the following articles:

    Reading Related Data with the Entity Framework in an ASP.NET MVC Application

    Loading Related Data

    Best regards,
    Dillion

    Thursday, November 15, 2018 7:32 AM