Model Class: StudentGrade.cs
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using SnapObjects.Data;
namespace Appeon.ApiDoc.Models.School
{
/// <summary>
/// This model class maps to the dbo.StudentGrade table.
/// It uses the primary key EnrollmentID to generate the Where clause for the Update operation.
///
/// EnrollmentID is the primary key and the identity.
/// </summary>
[Table("StudentGrade", Schema = "dbo")]
[UpdateWhereStrategy(UpdateWhereStrategy.KeyColumns)]
public class StudentGrade
{
[Key]
[Identity]
public int EnrollmentID { get; set; }
public int CourseID { get; set; }
public int StudentID { get; set; }
public decimal? Grade { get; set; }
}
}