static MongoRepositoryContext() { settings = new MongoRepositorySettings(); var url = new MongoUrl(ConfigurationManager.ConnectionStrings["SysDB"].ConnectionString); client = new MongoClient(url); server = client.GetServer(); database = server.GetDatabase(url.DatabaseName); }