Repository: asyncapi/modelina (ts)

Issue:
[C#] Generated enum extension methods lead to invalid references
#### Describe the bug
Invalid enum code is generated when using the C# code generation with `CSHARP_JSON_SERIALIZER_PRESET`
https://github.com/asyncapi/modelina/blob/ef4c0b739f31893cd1320bc1e55c4f9dbc746eea/src/generators/csharp/renderers/EnumRenderer.ts#L20 seems to be conflicting with 
https://github.com/asyncapi/modelina/blob/51062c1d74e6bf0514619510e0e6f413d73bf4e3/src/generators/csharp/presets/JsonSerializerPreset.ts#L142

There is a discrepancy between how the enum class name and it's external references are generated. Mostly just plural vs singular but I wonder if `formattedName` vs `type` might also lead to issues in the future :thinking: 

#### How to Reproduce
Created a test repo to reproduce: https://github.com/u-packs/modelina-example
When running `npm i && npm start` the invalid code is generated in the ./models folder

Same issue is shown in the test files: https://github.com/asyncapi/modelina/blob/c94c67d2320a02b4bb472b37cd87bd2bbd07c649/test/generators/csharp/presets/__snapshots__/JsonSerializerPreset.spec.ts.snap

#### Expected behavior
Both the enum class name and references to the enum class should be consistent. 

Pull request description:
fix(c#): generated enum extension methods lead to invalid references
<!--   Thank you for your contribution. Before you submit the pull request:
1. Follow our contribution guidelines
2. Test your changes and attach their results to the pull request.
3. Update the relevant documentation.
-->

**Description**
As mentioned in #700 the generated serializer code using enums did not match with the enum generated code.
This led to invalid code that required manual fixing. This tiny PR aligns both generators.

**Related issue(s)**
<!-- If you refer to a particular issue, provide its number, othewise, remove this section.
For example, `Resolves #123`, `Fixes #43`, or `See also #33`. The `See also #33` option will not automatically close the issue after the PR merge. -->
Fixes #700 

Patch:
diff --git a/src/generators/csharp/presets/JsonSerializerPreset.ts b/src/generators/csharp/presets/JsonSerializerPreset.ts
index 5554e440..44d8bc2d 100644
--- a/src/generators/csharp/presets/JsonSerializerPreset.ts
+++ b/src/generators/csharp/presets/JsonSerializerPreset.ts
@@ -139,7 +139,7 @@ function renderDeserializeProperty(type: string, model: CommonModel, inputModel:
     const propertyModelKind = TypeHelpers.extractKind(resolvedModel);
     //Referenced enums is the only one who need custom serialization
     if (propertyModelKind === ModelKind.ENUM) {
-      return `${type}Extension.To${type}(JsonSerializer.Deserialize<dynamic>(ref reader, options))`;
+      return `${type}Extensions.To${type}(JsonSerializer.Deserialize<dynamic>(ref reader, options))`;
     }
   }
   return `JsonSerializer.Deserialize<${type}>(ref reader, options)`;


Test patch:
diff --git a/test/generators/csharp/presets/__snapshots__/JsonSerializerPreset.spec.ts.snap b/test/generators/csharp/presets/__snapshots__/JsonSerializerPreset.spec.ts.snap
index 487d9df4..51670f7a 100644
--- a/test/generators/csharp/presets/__snapshots__/JsonSerializerPreset.spec.ts.snap
+++ b/test/generators/csharp/presets/__snapshots__/JsonSerializerPreset.spec.ts.snap
@@ -201,7 +201,7 @@ internal class TestConverter : JsonConverter<Test>
       }
       if (propertyName == \\"enumProp\\")
       {
-        var value = EnumTestExtension.ToEnumTest(JsonSerializer.Deserialize<dynamic>(ref reader, options));
+        var value = EnumTestExtensions.ToEnumTest(JsonSerializer.Deserialize<dynamic>(ref reader, options));
         instance.EnumProp = value;
         continue;
       }