public static void CreateWithConnectionString(string filePath, string connectionString)
        {
            var mainSettings = new MainSettings()
            {
                ConnectionStrings = new ConnectionStrings()
                {
                    DefaultConnection = connectionString,
                }
            };

            Save(mainSettings, filePath);
        }
        public static void CreateDefault(string filePath)
        {
            var mainSettings = new MainSettings()
            {
                ConnectionStrings = new ConnectionStrings()
                {
                    DefaultConnection = "...",
                }
            };

            Save(mainSettings, filePath);
        }
 public static void Save(MainSettings mainSettings, string filePath)
 {
     try
     {
         var output = JsonConvert.SerializeObject(mainSettings);
         File.WriteAllText(filePath, output, Encoding.UTF8);
     }
     catch (Exception e)
     {
         Console.WriteLine(e);
         throw;
     }
 }