Example #1
0
        public Aircraft GetAircraft(string aircraftId)
        {
            var cmd = new SqlCommand("dbo.Aircraft_Get");

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@AircraftId", aircraftId);
            DataTable table = db.Get(cmd);

            if (table.Rows.Count == 0)
            {
                return(null);
            }
            return(new Aircraft(table.Rows[0]));
        }
Example #2
0
        public User GetUser(Guid appUserId)
        {
            var cmd = new SqlCommand("AppUser_Get");

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@AppUserId", appUserId);
            DataTable table = db.Get(cmd);

            if (table.Rows.Count == 0)
            {
                return(null);
            }
            return(new User(table.Rows[0]));
        }
Example #3
0
        public FlightLog GetFlightLog(Guid flightLogId)
        {
            var cmd = new SqlCommand("dbo.FlightLog_Get");

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@FlightLogId", flightLogId);
            DataTable table = db.Get(cmd);

            if (table.Rows.Count == 0)
            {
                return(null);
            }
            return(new FlightLog(table.Rows[0]));
        }