Issues With Data Classes Generated By Radzen - Radzen Data Classes Define Incorrect Data Types

Starting Point:

I have an existing database with data loaded.

Desired End Result:

Radzen application with a SQL script (generated from Radzen data classes) to create a fresh database (with identical database schema as original) to use for User Acceptance Testing.

Current End Result:

After opening the Radzen generated code in Visual Studio, running add-migration and script-migration -i, the resulting script creates a database with many incorrect data types.

Just so we're on the same page, the original database I used to generate the Radzen application is different than the one the Radzen data classes define.

This is problematic for three reasons:

  1. The original database and the Radzen data classes don't match.

  2. Since I have data in my original database, I don't want to run any unnecessary scripts or migrations; the original database and the Radzen data classes should simply match.

  3. Since this breaks Entity Framework Core Migrations, my other team members cannot perform their work or add new migrations until this is fixed.

Migrations are very important to my team because we use the Code First approach religiously. We have found that it makes everything database related much simpler for us, our DBAs and Production Support. Code First has saved us tens of thousands of dollars over the years. That is why it is very important for us to have the original database align with Radzen generated data classes.

In my email, I have included a SQL script that enumerates the differences.

Steps to Reproduce:

Please see script and video sent to support.

Hey @SteelPhantomDude,

Can you post two sample screenshots what is generated and what is not correct?

I wish it was that simple.

But, there are many differences and this is a client project. So, I don't want to post anything here publicly.

If you review my email titled "Issues With Data Classes Generated By Radzen - Radzen Data Classes Define Incorrect Data Types", the scripts and the video, it should be pretty clear.

In particular, DatabaseDifferencesOriginalAndRadzen.sql gives all the differences found by the Visual Studio SQL Schema Diff tool.

Please let me know if you need additional information.

One more thing, the issue I posted at the following needs to be addressed before this one:

Issues With Data Classes Generated By Radzen - Missing OnDelete(DeleteBehavior.ClientSetNull) - Radzen IDE (Blazor WebAssembly) - Radzen

The files sent to support are not accessible to us and access has not yet been given after we requested it.

Also I have to remind you that Radzen does not generate SQL or database schemas. It reverse engineers databases. If you are somehow trying to recreate the database from that it may not work and we never claimed it is a supported Radzen feature. One can exclude tables, columns and relations from Radzen and as a result they will not appear in the generated EF model. Then if one tries to create a database from that model it will be incomplete.

The files have been shared with and

I have built many code generators, I know exactly what Radzen does.

The issue is.... Radzen reverse engineers a database schema and generates an application.

The data classes it generates are not valid for the given database schema. Hence, the differences.

I would think you'd want to generate 100% valid data classes so there are no potential issues for your clients in the future.

So, after generating a Radzen application, one should be able to run add-migration to generate the initial migration from the Radzen data classes.

Then, one should be able to run script-migration -i to create a script that creates a database that is identical to the original database. Not similar... identical.

If you think having invalid data classes makes sense from an accuracy and business perspective, that is your choice. I respect that.

If you choose not to fix this obvious issue, you'll be losing at least $1,200 in the future. Actually, probably much more since we have about 40 Developers in our agency.

I've already paid $1,200 over the past two years.

I won't be renewing my license. I'll be sure to tell my client we've moved on from Radzen... and they won't need to buy any licenses in the future.

Make your decision... It is your move.

Hi @SteelPhantomDude,

We are sorry that you have decided to part ways. I also fully refunded your latest subscription purchased on 6/13/2020. It was a regular Radzen Professional license for $599 per year. If you have another active one that we don't know of please do let us know so we can refund it as well.