private void GenerateMapperClass(Entity entity)
        {
            if (!Options.Model.Mapper.Generate)
            {
                return;
            }

            var directory = Options.Model.Mapper.Directory;
            var file      = entity.MapperClass + ".cs";
            var path      = Path.Combine(directory, file);

            _logger.LogInformation(File.Exists(path)
                ? "Updating object mapper class: {file}"
                : "Creating object mapper class: {file}", file);

            var template = new MapperClassTemplate(entity, Options);

            template.WriteCode(path);
        }
        private void GenerateMapperClass(Entity entity)
        {
            if (!Options.Model.Mapper.Generate)
            {
                return;
            }

            var directory = Options.Model.Mapper.Directory;
            var file      = entity.MapperClass + ".cs";
            var path      = Path.Combine(directory, file);

            if (Options.Project.AddSchemaToNamespace && !string.IsNullOrEmpty(entity.TableSchema))
            {
                path = Path.Combine(directory, entity.TableSchema, file);
            }

            _logger.LogInformation(File.Exists(path)
                ? "Updating object mapper class: {file}"
                : "Creating object mapper class: {file}", file);

            var template = new MapperClassTemplate(entity, Options);

            template.WriteCode(path);
        }