Skip to content

Allow instance creation to be with inner builder #318

@ivaylokenov

Description

@ivaylokenov

.Instance should allow creating controllers and view components with inner builder like so:

MyController<MyMvcController>
    .Instance(instance => instance    
        .WithOptions(options => options
            .For<MyAppSettings>(settings => settings.Cache = true))
        .WithSession(session => session
            .WithEntry("MySession", "MySessionValue")))
    .Calling(c => c.MyAction())
    .ShouldReturn()
    .View();

It should directly use the IControllerBuilder and IViewComponentBuilder interfaces.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions