Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

.NET Core / Blazor model attribute that doesn't get persisted to database

$
0
0

I have a model in my Blazor app that I want to create a "transitory" attribute for. This attribute is used internally in the app, but I do not want to persist it to the database.

However, when I change my model, it seems that the build process wants to create a database migration and change the database structure, adding the new attribute.

Is there a way to add a non-persistent attribute to the model, that will be ignored for database writes, but can be populated when the model is being handled in the app?


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>