In this scenario, i have this first case
public class WebHostBuilder : IWebHostBuilder
{
private IConfiguration _config;
private ILoggerFactory _loggerFactory;
}
and the other one is
public class WebHostBuilder : IWebHostBuilder
{
private IConfiguration _config {get; set;};
private ILoggerFactory _loggerFactory {get; set;};
}
My question is which of the two is correct or most commonly used?