Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

EF Core Exclude property from update

$
0
0

Hi,

I have the following code for excluding a property from update in EF Core but it doesn't seem to work.

        public void Update(Client client)
        {
            context.Entry<Client>(client).Property(x => x.DateTimeCreated).IsModified = false;
            context.Update(client);
        }

Anyone knows how it is done in EF Core


Viewing all articles
Browse latest Browse all 9386

Trending Articles



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