public SeverityInfo selectBySeverityID(int SeverityID)
 {
     using (OTMDataContext db = new OTMDataContext())
     {
         var          ID    = (from a in db.Severities where a.SeverityID == SeverityID select a).FirstOrDefault();
         SeverityInfo sinfo = new SeverityInfo();
         sinfo.SeverityID    = ID.SeverityID;
         sinfo.SeverityLevel = ID.SeverityLevel;
         return(sinfo);
     }
 }
        public List <SeverityInfo> SelectAllSeverityInfo()
        {
            List <SeverityInfo> slist = new List <SeverityInfo>();
            SeverityInfo        sinfo;

            using (OTMDataContext db = new OTMDataContext())
            {
                var source = (from a in db.Severities select a).ToList();
                foreach (var obj in source)
                {
                    sinfo               = new SeverityInfo();
                    sinfo.SeverityID    = obj.SeverityID;
                    sinfo.SeverityLevel = obj.SeverityLevel;
                    slist.Add(sinfo);
                }
            }
            return(slist);
        }