question

sblb-6958 avatar image
0 Votes"
sblb-6958 asked yogyogi answered

Blazor WaSM

Hi,
I've created a simple CRUD with BLAZOR WASM.
I would now like to transform Edit page with several different information that I have in an initial table.
I have an image of the elements I would like to add to Edit page.
In the image below you can see that I have added (by hand ;-)) elements, workflow, comments ... for example. One question I have: how do I save all the elements? Do I have to add elements in the database I created?
I would like to know if I'm going the right way because with a simple CRUD it seems to me that we are limited to editing the line. Should I use EditForm - forms and validation in Blazor instead?
Do you have any suggestions or examples?


98862-capture-decran-de-2021-05-22-17-05-54.png


dotnet-aspnet-core-blazor
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi@sblb-6958,

If you are adding new columns(workflow,comments) which are not existed in your db,you need to create them in db first.If your db have included these columns,you only need to update them in db.And if you want to validate the form data,you can use EditForm,here is an official doc.

1 Vote 1 ·

Thanks to your reply. I continue in this way.
See you to next question!
Sbl

0 Votes 0 ·

1 Answer

yogyogi avatar image
0 Votes"
yogyogi answered

You should use EditForm for editing purpose in Blazor. If you try to build this feature outside of EditForm then it will become complex and will be buggy. So use EditForm always. See this tutorial where EditForm is used in Blazor - Blazor WebAssembly : Call Web APIs to perform CRUD Operations



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.