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.ComponentModel.DataAnnotations.Schema;
- using System.Text;
-
- namespace EF_Code_First.Models
- {
- public class Student
- {
- public int StudentId { get; set; }
- public string? StudentName { get; set; }
- public DateTime? DateOfBirth { get; set; }
- public byte[]? Photo { get; set; }
- public decimal? Height { get; set; }
- public float? Weight { get; set; }
- [ForeignKey ("Grade")]
- public int G_Id { get; set; }
- //Navigation Property
- public Grade Grade { get; set; }
-
-
- public override string ToString()
- {
- StringBuilder builder = new StringBuilder();
-
- builder.Append(StudentId);
- builder.Append(" :");
- builder.Append(StudentName);
- builder.Append(" :");
- builder.Append(DateOfBirth);
- builder.Append(" :");
- builder.Append(Weight);
- builder.Append(" :");
- builder.Append(Height);
- return builder.ToString();
- }
- }
- }
|