FlexLabs.Upsert icon indicating copy to clipboard operation
FlexLabs.Upsert copied to clipboard

Is it possible to have similar behaviour to OnMatched but Inserted values instead?

Open defunky opened this issue 2 years ago • 1 comments

Is it possible to have similar behaviour to OnMatched but instead execute code if there wasn't a match but an insert instead. e.g. If it's inserted I want to update CreatedDateTime but OnMatched I want to update the ModifiedDateTime?

defunky avatar Jun 24 '22 21:06 defunky

https://www.entityframeworktutorial.net/faq/set-created-and-modified-date-in-efcore.aspx https://github.com/n0099/TiebaMonitor/blob/290c43ccf9054481d23b7bbc7ab6e6db54d6a38a/crawler/src/Db/TbmDbContext.cs#L89

n0099 avatar Jan 13 '23 18:01 n0099