title: Attempting to log to a SQL Server database, but it doesn't seem to be working
body: <p>I'm attempting to log to SQL Server. From what I found it looks like it should be right but it still doesn't seem to be logging. Can you see if there's anything I'm doing in this code? Sorry about posting the code as a picture, it wasn't formatting right for me here.   </p>
  
  <p>I tried attempting this in a way that is a little closer to how it'll actually, but still not having any luck.</p>
  
  <p><a href="https://i.stack.imgur.com/FwZD0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FwZD0.png" alt="Path where the info should be going to in the database."></a></p>
  
  <pre><code>public class Startup
  {
      public Startup(IConfiguration configuration)
      {
          Configuration = configuration;
  
          Log.Logger = new LoggerConfiguration()
             .Enrich.FromLogContext()
             .WriteTo.MSSqlServer(connectionString: "",
                   tableName: "Logs"
                  , schemaName: "LOG"
                  , autoCreateSqlTable: true,
                   restrictedToMinimumLevel: LogEventLevel.Information)
             .CreateLogger();
      }
  
      public IConfiguration Configuration { get; }
  
      // This method gets called by the runtime. Use this method to add services to the container.
      public void ConfigureServices(IServiceCollection services)
      {
          services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
      }
  
      // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
      public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
      {
          loggerFactory.AddSerilog();
  
          if (env.IsDevelopment())
          {
              app.UseDeveloperExceptionPage();
          }
          else
          {
              // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
              app.UseHsts();
          }
  
          app.UseHttpsRedirection();
          app.UseMvc();
      }
  }
  
  public class ValuesController : ControllerBase
  {
      private readonly ILogger&lt;ValuesController&gt; _logger;
  
      public ValuesController(ILogger&lt;ValuesController&gt; logger)
      {
          _logger = logger;
      }
  
      // GET api/values
      [HttpGet]
      public ActionResult&lt;IEnumerable&lt;string&gt;&gt; Get()
      {
          _logger.LogInformation($"Start:");
          _logger.LogInformation($"Start:");
          _logger.LogInformation($"Start:");
          _logger.LogInformation($"Start:");
          _logger.LogInformation($"Start:");
          _logger.LogInformation($"Start:");
          _logger.LogInformation($"Start:");
          _logger.LogInformation($"Start:");
          _logger.LogInformation($"Start:");
          _logger.LogInformation($"Start:");
          _logger.LogInformation($"Start:");
          _logger.LogInformation($"Start:");
          return new string[] { "value1", "value2" };
      }
   }
  </code></pre>