protected override BaseEntity CreateModel(BaseEntity entity)
        {
            STypes sType = entity as STypes;

            sType.ID   = (int)reader["ID"];
            sType.Type = reader["Type"].ToString();
            return(sType);
        }
        public static STypes SelectByID(int id)
        {
            if (Stypes == null)
            {
                STypeDB db = new STypeDB();
                Stypes = db.SelectAll();
            }
            STypes STypes = Stypes.Find(c => c.ID == id);

            return(STypes);
        }
        static QuestionsController()
        {
            foreach (QuestionType qtype in Enum.GetValues(typeof(QuestionType)))
            {
                var attr = (DisplayNameAttribute)typeof(QuestionType)
                           .GetMember(qtype.ToString())
                           .First()
                           .GetCustomAttributes(typeof(DisplayNameAttribute), true)
                           .FirstOrDefault();

                STypes.Add(attr?.DisplayName ?? qtype.ToString(), qtype);
            }
        }
 protected override void CreateInsertSql(BaseEntity entity, OleDbCommand cmd)
 {
     STypes c = entity as STypes;
 }