private void WriteConstructorsAndFields()
        {
            var fields             = new List <Parameter>();
            var dbContextParameter = CodeWriterUtils.GetDbContextMethodParameter();

            dbContextParameter.Name = _dbContextFieldName;
            fields.Add(dbContextParameter);
            fields.Add(new Parameter
            {
                DataType = $"ILogger<{CodeWriterUtils.GetRepositoryImplementationName(table)}>",
                Name     = _loggerFieldName
            });
            fields.Add(new Parameter
            {
                DataType = "IServiceProvider",
                Name     = _serviceProviderFieldName
            });
            WriteFields(fields);
            classBuilder.AppendLine("");
            WriteConstructor(fields);
            classBuilder.AppendLine("");
        }