Exemple #1
0
        public static List <Jet> JetList()
        {
            string sql = @"select *
                              from dbo.Jets;";

            return(SqlAccess.LoadData <Jet>(sql));
        }
Exemple #2
0
        public static List <Jet> CreateJet(string modelName, int serialNumber)
        {
            Jet jet = new Jet
            {
                modelName    = modelName,
                serialNumber = serialNumber
            };
            string sql = @"insert into dbo.Jets (ModelName, SerialNumber)    
                             values(@modelName, @serialNumber);";

            SqlAccess.SaveData(sql, jet);
            string returnSql = @"select * from dbo.Jets where SerialNumber = " + serialNumber + ";";

            return(SqlAccess.LoadData <Jet>(returnSql));
        }