• Introduction
  • API Documentation
  • Sample Apps
  • GitHub

    Show / Hide Table of Contents
    • DynamicVML
      • AddNewDynamicItem
      • DynamicList<TViewModel, TOptions>
      • DynamicList<TViewModel>
      • DynamicListItem<TViewModel>
      • IDynamicList
      • IDynamicList<TValue>
      • IDynamicListItem
      • IDynamicListItem<TViewModel>
      • ListRenderMode
      • NewItemMethod
    • DynamicVML.Extensions
      • ControllerExtensions
      • EditorExtensions
      • EnumerableExtensions
      • ViewDataExtensions
    • DynamicVML.Internals
      • Constants
      • ItemDisplayParameters
      • ItemEditorParameters
      • ItemParameters
      • ListDisplayParameters
      • ListEditorParameters
      • ListParameters
      • Parameters
    • DynamicVML.Options
      • DynamicListAttribute
      • DynamicListDisplayOptions
      • DynamicListEditorOptions
      • DynamicListOptions

    Class ControllerExtensions

    Extension methods to help sending back list items from the controllers.

    Inheritance
    Object
    ControllerExtensions
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: DynamicVML.Extensions
    Assembly: DynamicVML.dll
    Syntax
    public static class ControllerExtensions
    Remarks

    Please see the sample applications for examples on how they are used.

    Methods

    | Improve this Doc View Source

    PartialView(Controller, IDynamicList, AddNewDynamicItem)

    Creates the partial view for the item that should be sent back to the client.

    Declaration
    public static ActionResult PartialView(this Controller controller, IDynamicList item, AddNewDynamicItem parameters)
    Parameters
    Type Name Description
    Controller controller

    The controller handling the action for creating the new item.

    IDynamicList item

    The dynamic list item to be rendered.

    AddNewDynamicItem parameters

    The AddNewDynamicItem received by the controller.

    Returns
    Type Description
    ActionResult

    An ActionResult to be sent back to the client.

    | Improve this Doc View Source

    PartialView<TViewModel>(Controller, TViewModel, AddNewDynamicItem)

    Creates the partial view for the item that should be sent back to the client.

    Declaration
    public static ActionResult PartialView<TViewModel>(this Controller controller, TViewModel viewModel, AddNewDynamicItem parameters)
        where TViewModel : class
    Parameters
    Type Name Description
    Controller controller

    The controller handling the action for creating the new item.

    TViewModel viewModel

    The view model whose view should be rendered.

    AddNewDynamicItem parameters

    The AddNewDynamicItem received by the controller.

    Returns
    Type Description
    ActionResult

    An ActionResult to be sent back to the client.

    Type Parameters
    Name Description
    TViewModel

    The type of the view model whose view should be rendered.

    | Improve this Doc View Source

    PartialView<TViewModel>(Controller, TViewModel, AddNewDynamicItem, Action<DynamicListItem<TViewModel>>)

    Renders a partial view containing the item to be in plain HTML, and converts it to JSON so it can be sent back to the client. You should only use this method when using Post.

    Declaration
    public static ActionResult PartialView<TViewModel>(this Controller controller, TViewModel viewModel, AddNewDynamicItem parameters, Action<DynamicListItem<TViewModel>> options)
        where TViewModel : class
    Parameters
    Type Name Description
    Controller controller

    The controller handling the action for creating the new item.

    TViewModel viewModel

    The view model whose view should be rendered.

    AddNewDynamicItem parameters

    The AddNewDynamicItem received by the controller.

    Action<DynamicListItem<TViewModel>> options

    An action that allows for configuring the options to be associated with the new item before it gets inserted to the list.

    Returns
    Type Description
    ActionResult

    An ActionResult to be sent back to the client.

    Type Parameters
    Name Description
    TViewModel

    The type of the view model whose view should be rendered.

    | Improve this Doc View Source

    PartialView<TViewModel, TOptions>(Controller, TViewModel, AddNewDynamicItem, TOptions)

    Renders a partial view containing the item to be in plain HTML, and converts it to JSON so it can be sent back to the client. You should only use this method when using Post.

    Declaration
    public static ActionResult PartialView<TViewModel, TOptions>(this Controller controller, TViewModel viewModel, AddNewDynamicItem parameters, TOptions options)
        where TViewModel : class where TOptions : DynamicListItem<TViewModel>, new()
    Parameters
    Type Name Description
    Controller controller

    The controller handling the action for creating the new item.

    TViewModel viewModel

    The view model whose view should be rendered.

    AddNewDynamicItem parameters

    The AddNewDynamicItem received by the controller.

    TOptions options

    Any additional options you might want to specify for this item.

    Returns
    Type Description
    ActionResult

    An ActionResult to be sent back to the client.

    Type Parameters
    Name Description
    TViewModel

    The type of the view model whose view should be rendered.

    TOptions

    The options associated with the view model.

    | Improve this Doc View Source

    PartialView<TViewModel, TOptions>(Controller, TViewModel, AddNewDynamicItem, Action<TOptions>)

    Renders a partial view containing the item to be in plain HTML, and converts it to JSON so it can be sent back to the client. You should only use this method when using Post.

    Declaration
    public static ActionResult PartialView<TViewModel, TOptions>(this Controller controller, TViewModel viewModel, AddNewDynamicItem parameters, Action<TOptions> options)
        where TViewModel : class where TOptions : DynamicListItem<TViewModel>, new()
    Parameters
    Type Name Description
    Controller controller

    The controller handling the action for creating the new item.

    TViewModel viewModel

    The view model whose view should be rendered.

    AddNewDynamicItem parameters

    The AddNewDynamicItem received by the controller.

    Action<TOptions> options

    An action that allows for configuring the options to be associated with the new item before it gets inserted to the list.

    Returns
    Type Description
    ActionResult

    An ActionResult to be sent back to the client.

    Type Parameters
    Name Description
    TViewModel

    The type of the view model whose view should be rendered.

    TOptions

    The options associated with the view model.

    | Improve this Doc View Source

    PartialViewAsync(Controller, ICompositeViewEngine, IDynamicList, AddNewDynamicItem)

    Renders a partial view containing the item to be in plain HTML, and converts it to JSON so it can be sent back to the client. You should only use this method when using Post.

    Declaration
    public static Task<ActionResult> PartialViewAsync(this Controller controller, ICompositeViewEngine engine, IDynamicList item, AddNewDynamicItem parameters)
    Parameters
    Type Name Description
    Controller controller

    The controller handling the action for creating the new item.

    ICompositeViewEngine engine

    An instance of the ICompositeViewEngine class (which can be obtained using dependency injection by asking it as a new parameter in your controllers' constructor)

    IDynamicList item

    The dynamic list item to be rendered.

    AddNewDynamicItem parameters

    The AddNewDynamicItem received by the controller.

    Returns
    Type Description
    Task<ActionResult>

    An ActionResult to be sent back to the client.

    | Improve this Doc View Source

    PartialViewAsync<TViewModel>(Controller, ICompositeViewEngine, TViewModel, AddNewDynamicItem, Action<DynamicListItem<TViewModel>>)

    Renders a partial view containing the item to be in plain HTML, and converts it to JSON so it can be sent back to the client. You should only use this method when using Post.

    Declaration
    public static Task<ActionResult> PartialViewAsync<TViewModel>(this Controller controller, ICompositeViewEngine engine, TViewModel viewModel, AddNewDynamicItem parameters, Action<DynamicListItem<TViewModel>> options)
        where TViewModel : class
    Parameters
    Type Name Description
    Controller controller

    The controller handling the action for creating the new item.

    ICompositeViewEngine engine

    An instance of the ICompositeViewEngine class (which can be obtained using dependency injection by asking it as a new parameter in your controllers' constructor)

    TViewModel viewModel

    The view model whose view should be rendered.

    AddNewDynamicItem parameters

    The AddNewDynamicItem received by the controller.

    Action<DynamicListItem<TViewModel>> options

    Any additional options you might want to specify for this item.

    Returns
    Type Description
    Task<ActionResult>

    An ActionResult to be sent back to the client.

    Type Parameters
    Name Description
    TViewModel

    The type of the view model whose view should be rendered.

    | Improve this Doc View Source

    PartialViewAsync<TViewModel, TOptions>(Controller, ICompositeViewEngine, TViewModel, AddNewDynamicItem, TOptions)

    Renders a partial view containing the item to be in plain HTML, and converts it to JSON so it can be sent back to the client. You should only use this method when using Post.

    Declaration
    public static Task<ActionResult> PartialViewAsync<TViewModel, TOptions>(this Controller controller, ICompositeViewEngine engine, TViewModel viewModel, AddNewDynamicItem parameters, TOptions options)
        where TViewModel : class where TOptions : DynamicListItem<TViewModel>, new()
    Parameters
    Type Name Description
    Controller controller

    The controller handling the action for creating the new item.

    ICompositeViewEngine engine

    An instance of the ICompositeViewEngine class (which can be obtained using dependency injection by asking it as a new parameter in your controllers' constructor)

    TViewModel viewModel

    The view model whose view should be rendered.

    AddNewDynamicItem parameters

    The AddNewDynamicItem received by the controller.

    TOptions options

    Any additional options you might want to specify for this item.

    Returns
    Type Description
    Task<ActionResult>

    An ActionResult to be sent back to the client.

    Type Parameters
    Name Description
    TViewModel

    The type of the view model whose view should be rendered.

    TOptions

    The options associated with the view model.

    | Improve this Doc View Source

    PartialViewAsync<TViewModel, TOptions>(Controller, ICompositeViewEngine, TViewModel, AddNewDynamicItem, Action<TOptions>)

    Renders a partial view containing the item to be in plain HTML, and converts it to JSON so it can be sent back to the client. You should only use this method when using Post.

    Declaration
    public static Task<ActionResult> PartialViewAsync<TViewModel, TOptions>(this Controller controller, ICompositeViewEngine engine, TViewModel viewModel, AddNewDynamicItem parameters, Action<TOptions> options)
        where TViewModel : class where TOptions : DynamicListItem<TViewModel>, new()
    Parameters
    Type Name Description
    Controller controller

    The controller handling the action for creating the new item.

    ICompositeViewEngine engine

    An instance of the ICompositeViewEngine class (which can be obtained using dependency injection by asking it as a new parameter in your controllers' constructor)

    TViewModel viewModel

    The view model whose view should be rendered.

    AddNewDynamicItem parameters

    The AddNewDynamicItem received by the controller.

    Action<TOptions> options

    Any additional options you might want to specify for this item.

    Returns
    Type Description
    Task<ActionResult>

    An ActionResult to be sent back to the client.

    Type Parameters
    Name Description
    TViewModel

    The type of the view model whose view should be rendered.

    TOptions

    The options associated with the view model.

    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 César Roberto de Souza - All files are available under the MIT license except the logo, which comes from FontAwesome.