private TypeAtype12 GetTypeAtype12() { ExpertDB db = new ExpertDB(); var Planeset = db.PlaneSet.ToList(); db.Dispose(); if (Planeset.Exists(x => x.LogType == TYPE)) { return(TypeAtype12.AirCraft); } if (TYPE.Contains("BotPilot_")) { return(TypeAtype12.BotBotPilot); } return(TypeAtype12.Unknown); }