on-internet
← Community

EF Core force refresh Entity from Database (force fetching values from DB)

Stack Overflow ·

I would like to how to load/fetch the current database values for an entity ("force reload from database") with Entity Framework Core. My property looks like the following: [Column(TypeName = "decimal(16, 2)")] public decimal Fee { get; set; } If the Fee is saved with a higher precision than the one specified in the Column Attribute e.g. 1,2888 the Database round it to two decimal placed but the entity I save does not get Updated. So I tried to reload the values from the database to show the "correct current" values in this UI but neither of the following worked: // removed from tracked entiti

Comments

Sign in or sign up to comment and upvote.

No comments yet.