private string AddServices(string fileData, IEntityAdditionOptions options, string projectFolder) { string contractNamespace = GetContractNamespace(options, projectFolder); fileData = UsingStatements.Add(fileData, contractNamespace); string projectNamespace = GetProjectNamespace(options, projectFolder); fileData = UsingStatements.Add(fileData, projectNamespace); // Insert into Startup-Method StringEditor stringEditor = new StringEditor(fileData); string addScopedStatement = GetAddScopedStatement(options.EntityNamePlural, projectFolder); stringEditor.NextThatContains($"void Startup{options.Domain}"); stringEditor.Next(); stringEditor.NextThatContains("}"); if (!stringEditor.GetLineAtOffset(-1).Trim().Equals("{")) { stringEditor.InsertNewLine(); } stringEditor.InsertLine($" // {options.EntityNamePlural}"); stringEditor.InsertLine(addScopedStatement); return(stringEditor.GetText()); }