示例#1
0
        /// <summary>
        /// Register a hash mapper in a fluent manner.
        /// </summary>
        /// <typeparam name="T">The type to register</typeparam>
        /// <param name="action">The mapper delegate</param>
        public void RegisterHash <T>(Action <HashRepositoryMapper <T> > mapperAction) where T : class, new()
        {
            var mapping = new HashMapping <T>();

            mapperAction(new HashRepositoryMapper <T>(mapping));
            this.hashMappings[typeof(T)] = mapping;
        }
示例#2
0
 internal HashRepository(IDatabase database, HashMapping <T> mapping)
 {
     this.database = database;
     this.mapping  = mapping;
 }
示例#3
0
 internal HashRepositoryMapper(HashMapping <T> mapping)
 {
     this.mapping = mapping;
 }