Quantcast
Channel: C1 CMS Foundation - Open Source on .NET
Viewing all articles
Browse latest Browse all 2540

New Post: Community tech preview: MVC Functions

$
0
0
Hi @identify

Thanks for trying the functionality out!

1) Areas - aren't supported yet.

2) Thanks for reporting the issue with the Html.BeginForm, I've made a fix and a never version of the package can be downloaded here:

https://drive.google.com/file/d/0B84rD1f6-jIsdWVaSVo4Qm1Kekk/view?usp=sharing

Note that the registration code will look a bit different:

before:

public static void OnBeforeInitialize()
{
RegisterMvcFunctions();
RegisterFunctionRoutes();
}

...

After:

public static void OnBeforeInitialize()
{
var functions = MvcFunctionRegistry.NewFunctionCollection();

RegisterMvcFunctions(functions);
RegisterFunctionRoutes(functions);
}

private static void RegisterMvcFunctions(FunctionCollection functionCollection)
{
...
}

private static void RegisterFunctionRoutes(FunctionCollection functionCollection)
{
functionCollection.RouteCollection.MapMvcAttributeRoutes();
functionCollection.RouteCollection.MapRoute(
    "Default", // Route name
    "{controller}/{action}/{id}", // URL with parameters
    new { action = "Index", id = UrlParameter.Optional } // Parameter defaults
    );
}


3) No, async actions aren't supported yet. We had a working proof of concept based on an async http module, but a clean integration would require some changes to the cms core, which aren't in the feature list for the next release.

Viewing all articles
Browse latest Browse all 2540

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>