Releases: riganti/dotvvm
DotVVM 1.1.8
Fixes
- Validation errors are cleared before SPA navigation starts
- ViewModel and dependencies are disposed in finally block.
- Fixed route url parser with optional parameter at start of url
DotVVM 1.1.7
DotVVM 1.1.6
Asp.Net Core 2.0
Added support for AspNetCore 2.0 but dropped support for 1.0, because it's not compatible. OWIN hosting is basically untouched. For more info, have a look at dotvvm blog
DotVVM 1.1.5
Parameter binding
With parameter binding, you can simply get data from query string or route parameter. You just need to declare a property and mark it with the FromRoute
or FromQuery
attribute:
[FromRoute("id")]
public int? CustomerId { get; private set; }
DotVVM will look in the route parameter collection and if the parameter is there, it loads the property with the value and does all the conversions. It also automatically binds the property with Direction.ServerToClientFirstRequest
.
Request tracing
Added IRequestTracer
interface, that is called multiple times per request when a notable event happens (like on Init, Load, ...). We have prepared implementation for Azure Application Insights and for StackExchange's MiniProfiler - more info at dotvvm blog
Few more minor features
- GridViewDataSet supports async
- Support for scoped services on OWIN
- CheckBox.Checked supports null
- Commands render a
And bugfixes
DotVVM 1.1 RC
.NET Core support
DotVVM.Framework was splitted into several projects.
- DotVVM.Framework now contains almost everything except Hosting layer, so it is portable between Owin on old .NET, AspNetCore on old .NET and AspNetCore on .NET Core
- DotVVM.Framework.Hosting.OWIN contains hosting layer for OWIN, works only on old .NET Framework
- DotVVM.Framework.Hosting.AspNetCore contains hosting layer for AspNetCore.
Since the common core of Dotvvm framework is not dependent on hosting technology, we had to implement unifying interfaces above IOwinContext/HttpContext, IOwinRequest/HttpRequest and so on. These interfaces are implemented in each hosting layer package and should allow you to write components without referencing concrete hosting technology. We have tested it on our bootstrap wrappers and it worked without any source code change.
If you'd like to access raw IHttpContext
/HttpRequest
you can use GetOwinContext()
or GetAspNetCoreContext()
on IDotvvmRequestContext
to get to them.
ServiceLocator
is now considered deprecated, you should use the new AspNet Dependency Injection. However the GetService<T>()
still works as a wrapper over IServiceProvider
and in OWIN hosting you can also register services. On AspNetCore hosting you should call AddDotVVM()
in Startup.ConfigureSorvices
method, see the samples how to do that. On OWIN the UseDotVVM()
method takes Action<IDotvvmBuilder>
where you can register them.
Route constraints
#161
implemented all route constraints that are available in WebAPI as specified at http://www.asp.net/web-api/overview/web-api-routing-and-actions/attribute-routing-in-web-api-2#constraints. You can add your own in DotvvmConfiguration.
Bool properties without value
#191
You don't have to type <dot:Button IsSubmitButton="true" />
, <dot:Button IsSubmitButton />
is enough, the value true
is assigned implicitly.
@import
directive
It works like using
in C#, you can import namespace, namespace as alias and type as alias.
@import MyApp.Resources <-- namespace is imported
@import RS=MyApp.Resources <-- namespace is aliased as RS
@import Resources=MyApp.Resources.DetailPageResources <-- type is aliased as Resources
You can also import these globally in DotvvmConfiguration.Markup.ImportedNamespaces
.
All directives also support generic types with C# syntax:
@viewModel System.Collection.Generic.List<MyApp.ViewModels.SomeViewModel>
@resourceNamespace
and @resourceType
directives are now deprecated and will not work any more.
Set which wrapper tag can be rendered by control in markup
@wrapperTag span
directive sets the tag name (to span
in this case) and @noWrapperTag
directive suppresses rendering of the wrapper tag.
Property groups
You can map all attribute stating with specified prefix to an dictionary using property group. The Class-...
and Param-...
attributes works this way. you can have a look how we use the in the HtmlGenericControl
and RouteLink
controls.
Action Filters splited into interface
You can still use the ActionFilterAttribute
, the way how it works inside was changed, so you create filter only for ViewModel/Command/Request.
See #261
Mapping serialization options from code
So you don't have to mark the classes with attributes. Useful when you don't want to mess up your model or you don't have access to that code.
See #262
[Flags] enums in dothtml
You can set these properties in markup. The enum member names in the property value are separated by ,
or |
.
Breaking Changes
- methods on
ActionFilterAttribute
/ExceptionFilterAttribute
are async - property
RoleView.HideNonAuthenticatedUsers
renamed toHideForAnonymousUsers
New Controls
- ClaimView - Like RoleView but for claims, renders content only if claims match the specified conditions.
- EnvironmentView - The one for Environment