Show / Hide Table of Contents

    Model Class: CourseStudentInfo.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 to generate the Where clause for the Update operation. 
        /// The SqlParameter attribute defines an argument: courseId. 
        /// The SqlWhere attribute defines the SQL Where clause using the courseId argument.
        /// 
        /// EnrollmentID is the primary key and the identity.
        /// </summary>
        [SqlParameter("courseId",typeof(int))]
        [Table("StudentGrade", Schema = "dbo")]
        [UpdateWhereStrategy(UpdateWhereStrategy.KeyColumns)]
        [SqlWhere("CourseID = :courseId")]
        public class CourseStudentInfo
        {
            [Key]
            [Identity]
            public int EnrollmentID { get; set; }
    
            public int CourseID { get; set; }
    
            public int StudentID { get; set; }
    
            public decimal? Grade { get; set; }
        }
    }
    
    Back to top Generated by Appeon