Gage
Gage
CC#
Created by Gage on 11/26/2022 in #help
❔ Docker
Could you walk me through this? This is all new
10 replies
CC#
Created by Gage on 11/26/2022 in #help
❔ Docker
Create a Docker file for your Gradebook application, and a Docker Compose file for deploying your gradebook and a Docker image of SQL server You will need a volume for SQL server data to be persistent
10 replies
CC#
Created by Gage on 11/25/2022 in #help
✅ Mapping an Identity user to an instance of an EF core model ID
That Did not work
82 replies
CC#
Created by Gage on 11/25/2022 in #help
✅ Mapping an Identity user to an instance of an EF core model ID
82 replies
CC#
Created by Gage on 11/25/2022 in #help
✅ Mapping an Identity user to an instance of an EF core model ID
82 replies
CC#
Created by Gage on 11/25/2022 in #help
✅ Mapping an Identity user to an instance of an EF core model ID
82 replies
CC#
Created by Gage on 11/25/2022 in #help
✅ Mapping an Identity user to an instance of an EF core model ID
code gen it is haha
82 replies
CC#
Created by Gage on 11/25/2022 in #help
✅ Mapping an Identity user to an instance of an EF core model ID
yeah.....
82 replies
CC#
Created by Gage on 11/25/2022 in #help
✅ Mapping an Identity user to an instance of an EF core model ID
oh snap, So I used scaffolding to make my controllers. I should regenerate those as well since the model changed?
82 replies
CC#
Created by Gage on 11/25/2022 in #help
✅ Mapping an Identity user to an instance of an EF core model ID
yeah I've got several backups at this point lmfao
82 replies
CC#
Created by Gage on 11/25/2022 in #help
✅ Mapping an Identity user to an instance of an EF core model ID
I think I will just to be safe
82 replies
CC#
Created by Gage on 11/25/2022 in #help
✅ Mapping an Identity user to an instance of an EF core model ID
should I drop the previous database and delete the migrations?
82 replies
CC#
Created by Gage on 11/25/2022 in #help
✅ Mapping an Identity user to an instance of an EF core model ID
alright I am going to test this out 😅
82 replies
CC#
Created by Gage on 11/25/2022 in #help
✅ Mapping an Identity user to an instance of an EF core model ID
yeah! Okay good so I did the controllers correctly
82 replies
CC#
Created by Gage on 11/25/2022 in #help
✅ Mapping an Identity user to an instance of an EF core model ID
Would this map the Identity User to the Model correctly then?
public class Student : EntityBase
{
public BaseUser User { get; set; }
public int DepartmentID { get; set; }
public Department Major { get; set; }
public Teacher Advisor { get; set; }
public List<Enrollment> Enrollments { get; set; }
public List<Grade> Grades { get; set; }
[Required, MaxLength(100)]
public string FirstName { get; set; }
[Required, MaxLength(100)]
public string LastName { get; set; }
public DateTime DoB { get; set; }
[Phone]
public string Phone { get; set; }
[EmailAddress]
public string Email { get; set; }

public Student()
{
Enrollments = new List<Enrollment>();
Grades = new List<Grade>();
}
}
public class Student : EntityBase
{
public BaseUser User { get; set; }
public int DepartmentID { get; set; }
public Department Major { get; set; }
public Teacher Advisor { get; set; }
public List<Enrollment> Enrollments { get; set; }
public List<Grade> Grades { get; set; }
[Required, MaxLength(100)]
public string FirstName { get; set; }
[Required, MaxLength(100)]
public string LastName { get; set; }
public DateTime DoB { get; set; }
[Phone]
public string Phone { get; set; }
[EmailAddress]
public string Email { get; set; }

public Student()
{
Enrollments = new List<Enrollment>();
Grades = new List<Grade>();
}
}
82 replies
CC#
Created by Gage on 11/25/2022 in #help
✅ Mapping an Identity user to an instance of an EF core model ID
Oh okay, now I think I am back on track. I think I get what you mean
82 replies
CC#
Created by Gage on 11/25/2022 in #help
✅ Mapping an Identity user to an instance of an EF core model ID
Im looking at where you did _context
82 replies
CC#
Created by Gage on 11/25/2022 in #help
✅ Mapping an Identity user to an instance of an EF core model ID
wait, If I am doing it like that, would I need to put ApplicationDBContext in the student and teacher Models as well?
82 replies
CC#
Created by Gage on 11/25/2022 in #help
✅ Mapping an Identity user to an instance of an EF core model ID
oh I see
82 replies
CC#
Created by Gage on 11/25/2022 in #help
✅ Mapping an Identity user to an instance of an EF core model ID
never heard that term. What is a nav property? Same as a field?
82 replies