コード例 #1
0
ファイル: Builder.cs プロジェクト: ryanoshag/data-stores
 public static IDataStoreDescription <TKey, TValue> Map <TKey, TValue>(
     this INeedsDocumentMap target,
     string keyMap)
     where TValue : IDocument
 {
     return(new Builder <TKey, TValue>(target.Root
                                       .TypeArguments(typeof(TKey), typeof(TValue))
                                       .Argument("keyMap", keyMap)));
 }
コード例 #2
0
ファイル: Builder.cs プロジェクト: ryanoshag/data-stores
        // Mapping ////////////////////////////////////////////////////////////

        public static IDataStoreDescription <TKey, TValue> Map <TKey, TValue>(
            this INeedsDocumentMap target,
            Expression <Func <TValue, object> > partition,
            string keyMap)
            where TValue : IDocument
        {
            return(new Builder <TKey, TValue>(target.Root
                                              .TypeArguments(typeof(TKey), typeof(TValue))
                                              .Argument("keyMap", $"{{{GetPropertyInfo(partition).Name}}}|{keyMap}")));
        }