All packages have been updated to work with Asp.net 2.1
Now most of JavaScript libraries are installed with libman since Bower was deprected.
A bug in both SQL, and DocumentDB CRUDRepositories paged search has been fixed (in some circumstances the wrong number
of total pages was returned).
2.1.0 :
Column information on how to render external keys, that in previous versions were specified with external-key-static and external-key-dynamic tag helpers, nested in the column tag helper, now may be specified also through the ColumnConnectionAttribute, and by defining implementations
of the IDispalyValueItemsProvider or IDispalyValueSuggestionsProvider interfaces.
This approach, results in simpler tag helpers markup and in more modular code, since the interface implementations may be reused in several places.
Now both DefaultCRUDRepository, and DocumentDBCRUDRepository define the empty virtual BeforeAdd and BeforeUpdate methods that
inheriting classes may override to execute custom code before each single entity is added or updated.
Defined generic Mapping helpers (.Map(...).To<M>()) to transform a class into another. They are useful to map DTOs into ViewModels and vice-versa.
In fact, often we can't use a DTO directly in a View since it doesn't contain rendering specific attributes (ColumnConnectiom, ColumnLayout, FilterLayout, Display, etc.) so we are
forced to copy DTOs into ViewModels to keep separation of concerns between business and presentation layers.
Defined the IWebQueryable interface whose unique method accepts an ODATA query (IWebQueryProvider interface)
and returns the results of the query execution as a DataPage<D> object.
Defined also the DefaultWebQueryRepository wrapper that adds the IWebQueryable implementation to any
ICRUDRepository implementation.
Added the TransformationRepository implementation of ICRUDRepository that may wrap any ICRUDRepository implementation to let it automatically
maps ViewModels into DTOs before executing any operation. In other words TransformationRepository acts directly
on ViewModels instead of DTOs. Added also the ODataTransformationRepository that adds also IWebQueryable capabilities to the wrapped ICRUDRepository.
2.1.1 (only MvcControlsToolkit.Core.Business) :
Since just MvcControlsToolkit.Core.Business moved to 2.1.1, in order to upgrade
it, please add an explicit reference to MvcControlsToolkit.Core.Business 2.1.1.
Fixed the following bug: When a data object containing nested collections were updated
and when a collecion were declared as an IEnumerable instead of an ICollection sometimes
an exception was thrown.
2.1.0 (only MvcControlsToolkit.Core.Business) :
Since just MvcControlsToolkit.Core.Business moved to 2.1.0, in order to upgrade
it, please add an explicit reference to MvcControlsToolkit.Core.Business 2.1.0.
Added support for CosmoDB/DocumentDB. In order to get CosmoDB extension add a reference to
MvcControlsToolkit.Business.DocumentDB 1.0.0, this will foce also the upgrade of MvcControlsToolkit.Core.Business to 2.1.0
Added the
DeclareUpdateProjection<K>(Expression<Func<K,T>> proj)
static method to declare how to project
back the K ViewModel/DTO to the DB model handled by the repository. It supports a same-name convention with unflattening,
nested objects and nested collections. Since property names are automatically inferred according to the same-name convention proj needs to contain just the definition of the nested object and collections you would like to project
and the properties that do not conform to the same-name convention.
2.0.0 :
Added compatibility with .NET Standard 2.0, and Asp.net Core 2.0
Breaking change 1: with Asp.net Core 2.0 some more parentheses must be added in some Razor expressions due to changes in the new Razor version. Expressions like
@Model.SubInfo<ProductMaintenanceViewModelDetail>().Model must be substituted with
@(Model.SubInfo<ProductMaintenanceViewModelDetail>().Model)
Breaking change 2: with Asp.net 2 DateTimes are not converted implicitely into Month and Week
types in Select clauses of LinQ expressions, due to changes in the new Entity Framework. Thus. in order to assign a DateTime? to
a Month? in a Select or Projection you must provide an expression like:
DateValid = m.DateValid == null ? null : (Month?)Month.FromDateTime(m.DateValid.Value)
1.2.7 :
Added input-detail-class and input-detail-checkbox attributes to column tag helper to customize input css classes in controls that render data items in detail mode
Improved grid accessibility. Now when a grid row moves from display mode to edit mode or it is added to grid, it get focus,
so user may immediately access its fields and buttons with the tab.
Moreover, the only row of an immediate grid that is in edit mode get the aria-selected="true" attribute.
Fixed a bug that prevented correct globalization of some strings in column based controls
in multi-language web applications.
Fixed the key attribute of row based controls (grids, and detail forms for instance). Now no bugs occur anymore
when a key whose name differs from "Id" is assigned to this key attribute.
1.2.5 :
Added default animation to Html links
Added full ajax support to OData queries.
1.2.1 :
Rrevomed all dependencies from portable-net45+win8, thus avoiding the manual modifications to .csproj
1.2.0 :
OData 4.0 compatible Filtering, sorting, and grouping capabilities you may apply easily to grids or to your custom pages
When DateTimeOffset is used instead of DateTime for date+time editing,
automatic conversion to the browser Time zone is performed.
On the server side model binder "catches" date +
time and client time zone offset into the DateTimeOffset
Added a not trivial default "updating" behavior (current default behavior simply does nothing).
Namely, during ajax updates buttons that might interfere with the ongoing operation are automatically disabled,
and the updating part of the screen changes its opacity to give a vsual feedback of the update process.
As for previous versions default behavior may be changed
Added antiforgery protection to ServerCrudController Delete
When automatically copying ViewModel/DTO Month and Week properties
from/to DB Models with CRUDRepository methods,
automatic conversion is performed
DefaultCRUDRepository, and Projection operator will tranform models into
viewmodles also in nested collection with no need to copy all properties:
writing Select(m => new MyNestedViewModel{}) will suffice
Added support for interfaces in both business and asp.net core tools.
Business tools may return and process interfaces instead of ViewModels,
and model binder will bind and validate interfaces. Both Model Binder and Json
deserializer use Asp.net core DI to instantiate interfaces.
Improved Detail Form default Edit and display templates by adding bootstrap clearfix to all ViewPort line boundaries.
This way, the form layout will not break also when using custom column templates with higher heights.
1.1.5 :
Fixed a few minor bugs
[RunTimeType] now affects also Json serialization/deserialization
Added logic to handle Tag Helper Providers plug-ins
Added custom columns with a "name" instead of "asp-for"
1.1.4 :
Improved Linq/Database tools, and added CRUDRepository class.
Added Rows/Columns, Templates, and associated TagHelpers, cahe and paste TagHelpers. Added the whole Taghelper Provider Logic.
Added Batch Grid, Immediate Grid, Pager, Detail form, Autocomplete, CrudController and Server Controls TagHelper provider
1.0.1 Bug fix release. Fixed:
store-model tag helper not working properly when not in the root of the ViewModel.
Range & DynamicRance attributes fixed limits not working for input type month.