Model Class: D_Course.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using SnapObjects.Data;
using DWNet.Data;
using Newtonsoft.Json;
namespace Appeon.ApiDoc.Models
{
[DataWindow("d_course", DwStyle.Grid)]
[Table("Course", Schema = "dbo")]
#region DwSelectAttribute
[DwSelect("PBSELECT( VERSION(400) TABLE(NAME=\"Course\" ) @(_COLUMNS_PLACEHOLDER_) )")]
#endregion
[UpdateWhereStrategy(UpdateWhereStrategy.KeyAndConcurrencyCheckColumns)]
[DwKeyModificationStrategy(UpdateSqlStrategy.DeleteThenInsert)]
public class D_Course
{
[Key]
[DwColumn("Course", "CourseID")]
public int Courseid { get; set; }
[ConcurrencyCheck]
[DwColumn("Course", "Title")]
public string Title { get; set; }
[ConcurrencyCheck]
[DwColumn("Course", "Credits")]
public int Credits { get; set; }
[ConcurrencyCheck]
[DwColumn("Course", "DepartmentID")]
[DwChild("Departmentid", "Name", typeof(Dddw_Department), AutoRetrieve = true)]
public int Departmentid { get; set; }
}
}