Show / Hide Table of Contents

    Model Class: Department.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.Department table. 
        /// It uses the primary key to generate the Where clause for the Update operation.
        /// 
        /// DepartmentID is the primary key.
        /// </summary>
        [Table("Department", Schema = "dbo")]
        [UpdateWhereStrategy(UpdateWhereStrategy.KeyColumns)]
        public class Department
        {
            [Key]
            public int DepartmentID { get; set; }
    
            public string Name { get; set; }
    
            public decimal Budget { get; set; }
    
            public DateTime StartDate { get; set; }
    
            public int? Administrator { get; set; }
    
        }
    }
    
    Back to top Generated by Appeon