Quantcast
Channel: Getting IdConvention in RavenDB - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Answer by Matt Johnson-Pint for Getting IdConvention in RavenDB

$
0
0

After registering an id convention, the GenerateDocumentKey method will use that convention instead of the default hilo generation scheme.

It needs some parameters, which are easiest to get at if you first cast the IDocumentSession to a real DocumentSession.

var s = ((DocumentSession) session);var key = s.Conventions.GenerateDocumentKey(s.DatabaseName,                                            s.DatabaseCommands,                                            yourEntity);

Viewing all articles
Browse latest Browse all 2

Trending Articles



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