public static bool ExistDB() { using (OkrDataContext ctx = new OkrDataContext(conn)) { return ctx.DatabaseExists(); } }
public static bool ExistDB() { using (OkrDataContext ctx = new OkrDataContext(conn)) { return(ctx.DatabaseExists()); } }
public static void DeleteDB() { using (OkrDataContext context = new OkrDataContext(conn)) { if (context.DatabaseExists()) { context.DeleteDatabase(); } } }
public static Config GetConfig(string key) { using (OkrDataContext ctx = new OkrDataContext(conn)) { if (ctx.DatabaseExists()) { Config entity = ctx.Config.FirstOrDefault(x => x.AtKey == key); return entity; } } return null; }
public static Config GetConfig(string key) { using (OkrDataContext ctx = new OkrDataContext(conn)) { if (ctx.DatabaseExists()) { Config entity = ctx.Config.FirstOrDefault(x => x.AtKey == key); return(entity); } } return(null); }