framoz
framoz
CC#
Created by framoz on 3/15/2023 in #help
✅ EF Seeding and Relationships
"""""solved"""" it by manually writing part of the migration. Couldn't find how to do it in a way that wasn't this.
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.InsertData(
table: "FilmPeople",
columns: new[] { "FilmsId", "PeopleId" },
values: new object[,] {
{1,1 },
{1,2 },
{1,3 },
{2,4},
{2,5},
{2,6},
{3,4},
{3,5},
{3,6},
{4,7 },
{4,8},
{4,9},
{5,10},
{5,11},
{5,12},
});
}
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.InsertData(
table: "FilmPeople",
columns: new[] { "FilmsId", "PeopleId" },
values: new object[,] {
{1,1 },
{1,2 },
{1,3 },
{2,4},
{2,5},
{2,6},
{3,4},
{3,5},
{3,6},
{4,7 },
{4,8},
{4,9},
{5,10},
{5,11},
{5,12},
});
}
5 replies
CC#
Created by framoz on 3/15/2023 in #help
✅ EF Seeding and Relationships
tks
5 replies
CC#
Created by framoz on 3/14/2023 in #help
✅ Multiple selection input
now all its left to do is to find People that contain the ids present in SelectedPeople array and put them in Film.People
12 replies
CC#
Created by framoz on 3/14/2023 in #help
✅ Multiple selection input
I already created this SelectedPeople (that is a string[]) before, but the form code was wrong so it didn't worked and I started looking other stuff instead of this
12 replies
CC#
Created by framoz on 3/14/2023 in #help
✅ Multiple selection input
12 replies
CC#
Created by framoz on 3/14/2023 in #help
✅ Multiple selection input
also the code in create.cshtml was wrong
12 replies
CC#
Created by framoz on 3/14/2023 in #help
✅ Multiple selection input
and this MultiSelectList returns a string array
12 replies
CC#
Created by framoz on 3/14/2023 in #help
✅ Multiple selection input
what happened is that I was trying to pass this MultiSelectList to People (that is an ICollection<Person>)
12 replies
CC#
Created by framoz on 3/14/2023 in #help
✅ Multiple selection input
well, after a whole day I discovered what I was doing wrong
12 replies
CC#
Created by framoz on 3/14/2023 in #help
✅ Multiple selection input
12 replies
CC#
Created by framoz on 3/14/2023 in #help
✅ Multiple selection input
12 replies
CC#
Created by framoz on 3/14/2023 in #help
✅ Multiple selection input
12 replies
CC#
Created by framoz on 3/14/2023 in #help
✅ Multiple selection input
12 replies
CC#
Created by framoz on 1/30/2023 in #help
ASP NET MVC, can't show Collection in View, VS say it is null
you saved my life!
51 replies
CC#
Created by framoz on 1/30/2023 in #help
ASP NET MVC, can't show Collection in View, VS say it is null
someone said something similar in the chat, but I couldnt get it to work
51 replies
CC#
Created by framoz on 1/30/2023 in #help
ASP NET MVC, can't show Collection in View, VS say it is null
IT WORKED, THANK YOU SO MUCH
51 replies
CC#
Created by framoz on 1/30/2023 in #help
ASP NET MVC, can't show Collection in View, VS say it is null
i'll try it
51 replies
CC#
Created by framoz on 1/30/2023 in #help
ASP NET MVC, can't show Collection in View, VS say it is null
51 replies
CC#
Created by framoz on 1/30/2023 in #help
ASP NET MVC, can't show Collection in View, VS say it is null
made all the changes, following the tutorial, still the same error
51 replies
CC#
Created by framoz on 1/30/2023 in #help
ASP NET MVC, can't show Collection in View, VS say it is null
I was thinking if there is another way to write what I want to do inside that foreach
51 replies