Page Properties / Rename Option in Blazor Studio

Just curious... there was an Option to right click and go to page properties and over there we could provide appropriate name.

image

In Blazor Studio - I dont see such option. Is it hiding somewhere or option is gone?

image

That option does not exist (yet) in Radzen Blazor Studio. The rename feature in Radzen did a few things that related on the way code generation worked. Now that there is no code generation step in Radzen Blazor Studio such a rename cannot easily occur.

What do you want the rename to do in your case?

  1. If you want to change the title of the page in the navigation you can change the text of the corresponding RadzenPanelMenuItem in Shared/MainLayout.razor.
  2. If you want to change the url of a page - edit its source and change it in the @page "page-path" directive.
  3. If you want to change the file name - rename the file in Windows Explorer but be careful - Blazor generates the component class name from the filename. If that page was opened as a dialog somewhere in the app - you have to change its component type name to the new name.

Thanks @korchev for your response.

Sad to hear that Blazor not offering such way of renaming.
If you ask rationale behind the question... We have tables in various schema but every table having its Audit table in Audit schema. So for example, There is a table named as [Check].[T_DM_CHECKGROUP] and audit table is [Audit].T_DM_CHECKGROUP.

Now since, schema is not considered in Page naming or Model page etc, here, so I am getting one as TdmCheckGroup and another as TdmCheckgroup1 in Blazor Studio.

Will that not work? Of course it will work, but just pathetic for someone else to look at and figure out which one is for what etc.

image

Do you really need a crud page for every table in your database? Audit tables are usually automatically populated and do not need a separate set of pages. You can uncheck the entities you don't need pages generated for in the CRUD page wizard.

Totally Agreed @korchev . I dont need CRUD pages for Audit.
But the screen I shared is for the model (because there too its looking as bad) not pages. Now what I need, indeed is: that for main table there will be CRUD and on display of grid, when someone will click on a record, another grid will display it's Audit trail. So, somewhat like a Master - detail mode. So I still need, Audit in my Model and over there its appearing Tdmapplications1 -- that's what I'm calling "Bad"

Indeed Radzen would add the schema as a prefix in the class name e.g. DboCustomer for [dbo].[Customer]. We would investigate if we can implement the same behavior in Radzen Blazor Studio.

That would be Awesome @korchev
Really glad to see some feedbacks are well taken and product team looking into this. Highly Appreciated.

Hi @korchev
I could notice some improvement in this area already in 1.9.6
Just trying to better understand what logic / convention we are following now?
For example, when there are two table of same name and from different schema, now I can see, [Audit] schema table picked it's schema name in Model/class. But with that logic, I was assuming, other two table would start with "Msi" because that's the schema for those two. But over there nothing as such happened, it just picked Table Name only.... So just for my better understanding, could you please advise, what convention is followed now?

By the way, thanks for looking into this area, at least my Audit tables are not names as tablename1 etc. which is so so better.

Hi @Rk_M,

The idea was to prefix the table name with the schema if such table is already inferred however you are right, it will be much better if we always prefix table name with the schema if the schema is not default one (dbo)! We will do that in our next update!

1 Like

Brilliant! Yes that'd be great. Otherwise if there is no certainty which one will be inferred first and which one (second) will pick schema name, then it's gonna be a chaos.

Just an additional note. This change will produce different class names for your database entities and all previously created CRUD pages should be deleted and recreated in order to avoid compilation errors.

That makes sense and should be fine (from my point of view)