Пример #1
0
        public DatabaseConfiguration MapAlongWithSubclassesInSameAssebmly <T>(string collectionName, Action <TypeMappingBuilder <T> > builderFactory = null)
        {
            var builder = new TypeMappingBuilder <T>(new TypeMapping(collectionName));

            builderFactory?.Invoke(builder);
            PolymorpicClasses[typeof(T)] = builder.Mapping;

            return(this);
        }
Пример #2
0
        public DatabaseConfiguration Map <T>(string collectionName, Action <TypeMappingBuilder <T> > builderFactory = null)
        {
            var builder = new TypeMappingBuilder <T>(new TypeMapping(collectionName));

            builderFactory?.Invoke(builder);
            SingleClasses[typeof(T)] = builder.Mapping;

            return(this);
        }