You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- using System;
- using System.ComponentModel.DataAnnotations.Schema;
- using System.Text;
-
- namespace EF_Code_First.Models
- {
- public class Grade
- {
- public int GradeId { get; set; }
- public string? GradeName { get; set; }
- public string? Section { get; set; }
- [ForeignKey("StudentId")]
- public ICollection<Student>? Students { get; set; }
-
-
- public override string ToString()
- {
- StringBuilder builder = new StringBuilder();
- builder.Append(GradeId);
- builder.Append('\u002C');
- builder.Append(GradeName);
- builder.Append('\u002C');
- builder.Append(Students.Count);
- return builder.ToString();
- }
- }
- }
|