示例#1
0
 private ContentItem Get(ref ContentItem item, int id)
 {
     if (item != null)
     {
         return(item);
     }
     if (persister != null && id != 0)
     {
         return(item = persister.Get(id));
     }
     return(null);
 }
示例#2
0
 public T Load <T>(ValueType id)
 {
     return(new[] { persister.Get(Convert.ToInt32(id)) }.OfType <T>().FirstOrDefault());
 }