private void GenerateServiceClass(ProjectDataModelDto model)
        {
            var camelizedName = TextHelper.Camelize(model.Name);
            var sb            = new StringBuilder();

            sb.AppendLine($"using System.Collections.Generic;");
            sb.AppendLine($"using System.Linq;");
            sb.AppendLine($"using System.Threading;");
            sb.AppendLine($"using System.Threading.Tasks;");
            sb.AppendLine($"using {Name}.Entities;");
            sb.AppendLine($"using {Name}.Repositories;");
            sb.AppendLine();
            sb.AppendLine($"namespace {Name}.Services");
            sb.AppendLine("{");
            sb.AppendLine($"    public class {model.Name}Service : I{model.Name}Service");
            sb.AppendLine("    {");
            sb.AppendLine($"        private readonly I{model.Name}Repository _{camelizedName}Repository;");
            sb.AppendLine();
            sb.AppendLine($"        public {model.Name}Service(I{model.Name}Repository {camelizedName}Repository)");
            sb.AppendLine("        {");
            sb.AppendLine($"            _{camelizedName}Repository = {camelizedName}Repository;");
            sb.AppendLine("        }");
            sb.AppendLine();
            sb.AppendLine($"        public async Task<{model.Name}> Get{model.Name}ById(int id, CancellationToken cancellationToken = default(CancellationToken))");
            sb.AppendLine("        {");
            sb.AppendLine($"            cancellationToken.ThrowIfCancellationRequested();");
            sb.AppendLine();
            sb.AppendLine($"            return await _{camelizedName}Repository.GetById(id, cancellationToken);");
            sb.AppendLine("        }");
            sb.AppendLine();
            sb.AppendLine($"        public async Task<List<{model.Name}>> Get{TextHelper.Pluralize(model.Name)}(CancellationToken cancellationToken = default(CancellationToken))");
            sb.AppendLine("        {");
            sb.AppendLine($"            cancellationToken.ThrowIfCancellationRequested();");
            sb.AppendLine();
            sb.AppendLine($"            return await _{camelizedName}Repository.GetAll(cancellationToken);");
            sb.AppendLine("        }");
            sb.AppendLine();
            sb.AppendLine($"        public async Task<int> Create{model.Name}({model.Name} entity, CancellationToken cancellationToken = default(CancellationToken))");
            sb.AppendLine("        {");
            sb.AppendLine($"            cancellationToken.ThrowIfCancellationRequested();");
            sb.AppendLine();
            sb.AppendLine($"            return await _{camelizedName}Repository.Create(entity, cancellationToken);");
            sb.AppendLine("        }");
            sb.AppendLine();
            sb.AppendLine($"        public async Task Update{model.Name}({model.Name} updatedEntity, CancellationToken cancellationToken = default(CancellationToken))");
            sb.AppendLine("        {");
            sb.AppendLine($"            cancellationToken.ThrowIfCancellationRequested();");
            sb.AppendLine();
            sb.AppendLine($"            var entity = await _{camelizedName}Repository.GetById(updatedEntity.Id, cancellationToken);");
            foreach (var property in model.Properties)
            {
                sb.AppendLine($"            entity.{property.Name} = updatedEntity.{property.Name};");

                if (property.RelationalType == PropertyRelationalType.OneToOne)
                {
                    sb.AppendLine($"            entity.{property.Name}Id = updatedEntity.{property.Name}Id;");
                }
            }

            sb.AppendLine($"            await _{camelizedName}Repository.Update(entity, cancellationToken);");
            sb.AppendLine("        }");
            sb.AppendLine();
            sb.AppendLine($"        public async Task Delete{model.Name}(int id, CancellationToken cancellationToken = default(CancellationToken))");
            sb.AppendLine("        {");
            sb.AppendLine($"            cancellationToken.ThrowIfCancellationRequested();");
            sb.AppendLine();
            sb.AppendLine($"            await _{camelizedName}Repository.Delete(id, cancellationToken);");
            sb.AppendLine("        }");
            sb.AppendLine();
            sb.AppendLine("    }");
            sb.AppendLine("}");
            sb.AppendLine();

            _projectHelper.AddFileToProject(Name, $"Services/{model.Name}Service.cs", sb.ToString(), modelId: model.Id);
        }