# Funny issue about name generation on inferring database and CRUD page generations

**URL:** <https://forum.radzen.com/t/funny-issue-about-name-generation-on-inferring-database-and-crud-page-generations/14282>\
**Category:** Radzen Blazor Studio\
**Created:** [June 5, 2023, 10:39am UTC](https://forum.radzen.com/t/funny-issue-about-name-generation-on-inferring-database-and-crud-page-generations/14282 "2023-06-05T10:39:28Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![koksal.basar](https://forum.radzen.com/user_avatar/forum.radzen.com/koksal.basar/32/6186_2.png) [@koksal.basar](https://forum.radzen.com/u/koksal.basar)\
**Post date:** [June 5, 2023, 10:39am UTC](https://forum.radzen.com/t/funny-issue-about-name-generation-on-inferring-database-and-crud-page-generations/14282/1 "2023-06-05T10:39:28Z")

</div>

Hi everybody,

I faced strange name converting when inferring tables from the database.

My table name is RatiosEbitda. It's about the EBITDA values of different industries. But RBS converts this table name to RatiosEbitdum :)).

Here is a part of generated code.

> protected IEnumerable\<ValuraApp.Models.ValueCoApp.RatiosEbitdum\> ratiosEbitda;
> 
> ```
> protected RadzenDataGrid<ValuraApp.Models.ValueCoApp.RatiosEbitdum> grid0;
> protected override async Task OnInitializedAsync()
> {
> ratiosEbitda = await ValueCoAppService.GetRatiosEbitda();
> }
> 
> protected async Task AddButtonClick(MouseEventArgs args)
> {
> await DialogService.OpenAsync<AddRatiosEbitdum>("Add RatiosEbitdum", null);
> await grid0.Reload();
> }
> 
> protected async Task EditRow(ValuraApp.Models.ValueCoApp.RatiosEbitdum args)
> {
> await DialogService.OpenAsync<EditRatiosEbitdum>("Edit RatiosEbitdum", new Dictionary<string, object> { {"id", args.id} });
> }
> 
> protected async Task GridDeleteButtonClick(MouseEventArgs args, ValuraApp.Models.ValueCoApp.RatiosEbitdum ratiosEbitdum)
> {
> try
> {
> if (await DialogService.Confirm("Are you sure you want to delete this record?") == true)
> {
> var deleteResult = await ValueCoAppService.DeleteRatiosEbitdum(ratiosEbitdum.id);
> 
> ```
> 
> ....

This is funny. Is there a way to keep the table name? Or any suggestions? (except change the table name :)) because it's already used by another app whit this name.

Thanks

---

<div class="post-metadata">

**Author:** ![enchev](https://forum.radzen.com/user_avatar/forum.radzen.com/enchev/32/16_2.png) [@enchev](https://forum.radzen.com/u/enchev)\
**Post date:** [June 5, 2023, 12:17pm UTC](https://forum.radzen.com/t/funny-issue-about-name-generation-on-inferring-database-and-crud-page-generations/14282/2 "2023-06-05T12:17:10Z")

</div>

[This is what is used internally](https://learn.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.design.ipluralizer?view=efcore-7.0) - at the moment it cannot be turned off.

---

<div class="post-metadata">

**Author:** ![koksal.basar](https://forum.radzen.com/user_avatar/forum.radzen.com/koksal.basar/32/6186_2.png) [@koksal.basar](https://forum.radzen.com/u/koksal.basar)\
**Post date:** [June 7, 2023, 11:55am UTC](https://forum.radzen.com/t/funny-issue-about-name-generation-on-inferring-database-and-crud-page-generations/14282/3 "2023-06-07T11:55:27Z")

</div>

Hi @enchev,

I understand this is not controlled by you directly. But I think IPluralizer Interface gives some abilities to add custom rules. Can't you add these kinds of words to these custom rules? It could be useful.

---

<div class="post-metadata">

**Author:** ![enchev](https://forum.radzen.com/user_avatar/forum.radzen.com/enchev/32/16_2.png) [@enchev](https://forum.radzen.com/u/enchev)\
**Post date:** [June 8, 2023, 4:55am UTC](https://forum.radzen.com/t/funny-issue-about-name-generation-on-inferring-database-and-crud-page-generations/14282/4 "2023-06-08T04:55:18Z")

</div>

As far as we know the only way to avoid this is by writing our own custom table naming convention however at the moment this is not in our immediate plans.

---

<div class="post-metadata">

**Author:** ![koksal.basar](https://forum.radzen.com/user_avatar/forum.radzen.com/koksal.basar/32/6186_2.png) [@koksal.basar](https://forum.radzen.com/u/koksal.basar)\
**Post date:** [June 8, 2023, 6:18am UTC](https://forum.radzen.com/t/funny-issue-about-name-generation-on-inferring-database-and-crud-page-generations/14282/5 "2023-06-08T06:18:49Z")

</div>

Hi @enchev,

I always try to understand your limitation or priority but; I really disappointed when I read your response. I think we are not looking at the same perspective.

I'll try to explain you.

I did not share the following issue with your team. This is a dramatic Turkish "ı" problem. Sometimes new softwares face the same problem. I had not reported this issue because it's cosmetics and it's not affected the final product.

![image](https://forum.radzen.com/uploads/default/original/2X/c/c4e7b52935680908b39155565657153c64f557bd.png)

But the naming issue affects the product. This is not a cosmetics problem but a quality problem. Because you condemn me to work with a wrong or an unwanted result.

You can correct this issue with a couple of lines. You are already using Plurazition Interface so you add that to your code. How difficult can be to add a similar to the following code?

```
using System.Data.Entity.Design.PluralizationServices;

public string Pluralize(string word)
{
    // Custom pluralization rules
    if (word.Equals("SomeWords", StringComparison.OrdinalIgnoreCase))
    {
        return word; // Return the singular form unchanged
    }

    // Default pluralization logic
    return EnglishPluralizationService.CreateService().Pluralize(word);
}

public string Singularize(string word)
{
     // Custom Singularization rules
         .......................
         .......................
    // Default singularization logic
    return EnglishPluralizationService.CreateService().Singularize(word);
}

```

This does not create extra workloads. Only you have to insert this into your plan. Sometimes you have to do some favor to your customers. Because your customers are not consuming, they are producing new products with your product and their quality level is depending on your quality level.

I'm not talking about a general custom naming rules module but;

- Pluralization can be given as an option in table naming.
- You can provide the developer with a list of words to bypass.

I hope that I explained enough this request is not unnecessary or insignificant and it's easy.

Thanks for your time,  
KB

---

<div class="post-metadata">

**Author:** ![enchev](https://forum.radzen.com/user_avatar/forum.radzen.com/enchev/32/16_2.png) [@enchev](https://forum.radzen.com/u/enchev)\
**Post date:** [June 8, 2023, 6:37am UTC](https://forum.radzen.com/t/funny-issue-about-name-generation-on-inferring-database-and-crud-page-generations/14282/6 "2023-06-08T06:37:20Z")

</div>

Hey @koksal.basar,

You misunderstood my response. We are not using directly IPluralizer - this interface is part of default Microsoft EF scaffolding services used under the hood in Radzen Blazor Studio. To implement a dictionary with custom words that should not be pluralized like EBITDA we need to bypass the entire default naming convention and this is not going to be trivial task.

---

<div class="post-metadata">

**Author:** ![korchev](https://forum.radzen.com/user_avatar/forum.radzen.com/korchev/32/4_2.png) [@korchev](https://forum.radzen.com/u/korchev)\
**Post date:** [June 8, 2023, 6:44am UTC](https://forum.radzen.com/t/funny-issue-about-name-generation-on-inferring-database-and-crud-page-generations/14282/7 "2023-06-08T06:44:23Z")

</div>

> [@koksal.basar](#):
>
> Pluralization can be given as an option in table naming.

This alone would take at least a month to develop as it affects a lot of our code generation templates. As @enchev this is not a trivial task at all and we don't plan to add it immediately.

> [@koksal.basar](#):
>
> I hope that I explained enough this request is not unnecessary or insignificant and it's easy.

And I hope you understand your request isn't trivial to implement and not just two lines of code.

If would recommend to name your tables in English. Otherwise if you happen to work for a foreign customer they would end up with a Turkish codebase which may not be ideal from maintenance point of view.

---

<div class="post-metadata">

**Author:** ![koksal.basar](https://forum.radzen.com/user_avatar/forum.radzen.com/koksal.basar/32/6186_2.png) [@koksal.basar](https://forum.radzen.com/u/koksal.basar)\
**Post date:** [June 8, 2023, 4:12pm UTC](https://forum.radzen.com/t/funny-issue-about-name-generation-on-inferring-database-and-crud-page-generations/14282/8 "2023-06-08T16:12:49Z")

</div>

Hi @enchev and @korchev,,

Sorry for the misunderstanding. But I thought you used directly this interface because of the following response.

> [@enchev](#):
>
> [This is what is used internally](https://learn.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.design.ipluralizer?view=efcore-7.0) - at the moment it cannot be turned off.

You say IPluralizer is used internally, this is what I understood.

> [@korchev](#):
>
> This alone would take at least a month to develop as it affects a lot of our code generation templates. As @enchev this is not a trivial task at all and we don't plan to add it immediately.

I can understand if you use your own codes instead of IPluralizer workload could be higher than my suggestion (Why? I can not question this because of your technical decision. I only use the result.).

And I do not evaluate as trivial any line of your code.

> [@korchev](#):
>
> If would recommend to name your tables in English.

Thank you for your suggestion about table names. But you have to know this not only table names but also remark lines are in English in my code in fact. And RatiosEbitda is a combination of two English Words. Ratios + EBITDA(Earnings Before Interest, Taxes, Depreciation, and Amortization). This is not related to Turkish. Isn't it?

If it was a Turkish word, believe me, I wouldn't report it. I gave the Turkish "ı" example for this. It's just a cosmetic issue and won't affect the result.

I reported some problems with language in the past. But these were not Turkish language-oriented but localization oriented.

I always appreciate your effort and your products as a result. I hope you think to add this feature in the near future.

PS : I hope you will appreciate that when I (or one of your users) report a problem, I do it to improve the quality of RBS, not for my own convenience.

---

<div class="post-metadata">

**Author:** ![enchev](https://forum.radzen.com/user_avatar/forum.radzen.com/enchev/32/16_2.png) [@enchev](https://forum.radzen.com/u/enchev)\
**Post date:** [June 8, 2023, 4:32pm UTC](https://forum.radzen.com/t/funny-issue-about-name-generation-on-inferring-database-and-crud-page-generations/14282/9 "2023-06-08T16:32:29Z")

</div>

Here is something I've made today that might be useful in your case:

 ![image](https://forum.radzen.com/uploads/default/original/2X/9/918433d46a7f613870aee5cd49a229695ee951fe.png)

We will do our best to provide it soon.

---

<div class="post-metadata">

**Author:** ![koksal.basar](https://forum.radzen.com/user_avatar/forum.radzen.com/koksal.basar/32/6186_2.png) [@koksal.basar](https://forum.radzen.com/u/koksal.basar)\
**Post date:** [June 8, 2023, 5:16pm UTC](https://forum.radzen.com/t/funny-issue-about-name-generation-on-inferring-database-and-crud-page-generations/14282/10 "2023-06-08T17:16:27Z")

</div>

It's great and made me very happy @enchev,

Would you consider putting this feature in the inferring rather than the database definition phase? It can give the developer much more flexibility. (Of course if it's possible)

---

<div class="post-metadata">

**Author:** ![koksal.basar](https://forum.radzen.com/user_avatar/forum.radzen.com/koksal.basar/32/6186_2.png) [@koksal.basar](https://forum.radzen.com/u/koksal.basar)\
**Post date:** [June 10, 2023, 1:43pm UTC](https://forum.radzen.com/t/funny-issue-about-name-generation-on-inferring-database-and-crud-page-generations/14282/11 "2023-06-10T13:43:12Z")

</div>

Hi @enchev,

Your solution is working well and I took back my last suggestion.

But I have a question.

I could not figure out what is affected if both the "direct database" and "pluralize" options are selected.

Selecting "Direct Database" and selecting no option look the same.  
Selecting only "Pluralize" and selecting both options look the same.

What can't I see?

---

<div class="post-metadata">

**Author:** ![enchev](https://forum.radzen.com/user_avatar/forum.radzen.com/enchev/32/16_2.png) [@enchev](https://forum.radzen.com/u/enchev)\
**Post date:** [June 10, 2023, 1:49pm UTC](https://forum.radzen.com/t/funny-issue-about-name-generation-on-inferring-database-and-crud-page-generations/14282/12 "2023-06-10T13:49:03Z")

</div>

Both are options of EF tools scaffold command. Check the reference for details:

> **[EF Core tools reference (.NET CLI) - EF Core](https://learn.microsoft.com/en-us/ef/core/cli/dotnet)**
>
> Reference guide for the Entity Framework Core .NET Core CLI tools
