2

Let me start off by saying, this is in no way a criticism. Dapper is an incredible tool, which I'm extremely happy to use. Dapper.Contrib being no different.

Perhaps I'm misunderstanding the purpose of the [Computed] attribute. But the documentation clearly states:

... this property is computed and should not be part of updates

Which leads me to believe the other operations, SELECT/INSERT, remain valid. And this is in fact true for SELECT

However, in looking at the source it's clear that it's ignore on INSERT statements as well.

You can see in this commit that the code was clearly changed to ignore properties with the [Computed] attribute. But the title of the commit is misleading, insofar that it seems like it means to allow computed properties on INSERT.

I guess my question is, are we looking at an instance of outdated documentation? Or, should computed properties be pushed through on INSERT's and this was a faulty commit?

pim
  • 12,019
  • 6
  • 66
  • 69

0 Answers0