Support for code-first

Does Radzen support the code-first workflow where you start building up your Entitity classes over time and keep adding to the UI?

The examples that I see are when you have a database already existing.

Thanks!

Hi @michaelgrissom,

Yes, Radzen will need the database in order to scaffold pages, database schema etc., still I believe that you can create the UI manually and use Invoke Custom Method actions if the database schema is still unknown.

@michaelgrissom
We use code first to update the database but use a separate console app and just re-Infer the data source afterwards in Radzen.

@mumfie So you have an API project that you do code first in, and then a separate project for the UI?

@michaelgrissom ,
No. Its not an API project. It a .net core console EXE created using Visual Studio

Another approach with existing db is a separate solution EF code first from database then you have migrations, source control and deploy for your database.

https://docs.microsoft.com/en-us/ef/ef6/modeling/code-first/workflows/existing-database

Do this in an AspNet WebAPI solution, add OData controllers with EF and deploy. Now your db is a service.

this project can also contain business logic shared by all consumers including RadZen apps.

Finally, use OData source in RadZen.

HTH
Josh

1 Like