Exemplo n.º 1
0
 /// <summary>
 /// Returns the Data Source Item as strongly typed
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <returns></returns>
 protected virtual T GetDataSource <T>(GetKnownOptions options = null) where T : class
 {
     if (!MvcContext.HasDataSource)
     {
         return(null);
     }
     return(MvcContext.GetDataSourceItem <T>(options ?? new GetKnownOptions()));
 }
Exemplo n.º 2
0
 /// <summary>
 /// Returns the Data Source Item as strongly typed
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <returns></returns>
 public T GetDataSource <T>(GetKnownOptions options = null) where T : class
 {
     return(MvcContext.GetDataSourceItem <T>(options ?? new GetKnownOptions()));
 }