41 lines
		
	
	
		
			948 B
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			41 lines
		
	
	
		
			948 B
		
	
	
	
		
			C#
		
	
	
	
	
	
| using System;
 | |
| using System.Collections;
 | |
| using System.Collections.Generic;
 | |
| 
 | |
| namespace AIMSObjectQuery
 | |
| {
 | |
|     internal partial class KnowledgeBaseMap:IMap
 | |
| 	{
 | |
| 	    private Dictionary<string, string> dictionary = new Dictionary<string, string>();
 | |
|         public KnowledgeBaseMap()
 | |
|         {
 | |
|         	dictionary.Add("id", "Id");
 | |
|         	dictionary.Add("parentid", "ParentId");
 | |
|         	dictionary.Add("nanme", "Nanme");
 | |
|         	dictionary.Add("content", "Content");
 | |
|         	dictionary.Add("orderby", "OrderBy");
 | |
|         	dictionary.Add("imagepath", "ImagePath");
 | |
|         	dictionary.Add("videopath", "VideoPath");
 | |
|         }
 | |
| 
 | |
|         #region IMap 成员
 | |
| 
 | |
|         public string this[string propertyName]
 | |
|         {
 | |
|             get
 | |
| 			{ 
 | |
| 				try
 | |
| 				{
 | |
| 					return dictionary[propertyName.ToLower()]; 
 | |
| 				}
 | |
| 				catch (KeyNotFoundException)
 | |
| 				{
 | |
| 					throw new Exception(propertyName + "属性不存在");
 | |
| 				}
 | |
| 			}
 | |
|         }
 | |
| 
 | |
|         #endregion
 | |
| 	}
 | |
| }
 |