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 Int32 DepartmentID { get; set; }
        public String Name { get; set; }
        public Decimal Budget { get; set; }
        public DateTime StartDate { get; set; }
        public Int32? Administrator { get; set; }
    }
}