KooriByte
KooriByte
CC#
Created by KooriByte on 2/5/2023 in #help
✅ Collection appears to be null, even though it's not null on DB
85 replies
CC#
Created by KooriByte on 2/4/2023 in #help
✅ How would you search this?
Hey guys, I need help not with a direct answer, but I want to know how would you search the answer online for this. I have a MVC Project for a FilmReviewer (like IMDb, MyAnimeList, etc) I need to create a button in Film Detail View, that: puts this film in the users favorited list, puts the user in the film's favoritedby list, and afterwards, changes color, so the user can know that he already favorited this specific film. I know many of you may have an answer for this problem, and I would also appreciate a direct answer, but my main problem is that I'm finding it difficult to search online how to do this, so that is my question... How would you search this online, if you had this doubt?
38 replies
CC#
Created by KooriByte on 2/4/2023 in #help
✅ Where to declare relationships when you have two DBContexts?
Hi! I ended up with two DBContexts in my project (ApplicationDbContext and an IdentityDbContext)... Now I have to do a many to many relationship between an object and a user, but I'm not sure how would this work. I declared the relationship in one DbContext, and the migration with this one worked (with a warning that I might lose data). If I try to do a Migration with the other Context, it screams to me an error that i know how to fix, but would imply in declaring this relationship two times, and I'm not sure if this is ok. Has anyone here experienced this?? I would really appreciate some help, it is the first time I try to develop something without a tutorial and it is a bit overwhelming at times. Tkss 😄
38 replies