14 lines
770 B
C#
14 lines
770 B
C#
namespace EnVisage.Code.ModelBinders
|
|
{
|
|
using Models;
|
|
|
|
/// <summary>
|
|
/// Model binder for ActivityCalendarSaveModel type. It is required, because default MVC model binder does not bind dictionary with nested dictionaries, that do not have any value
|
|
/// Example: User adds team in the calendar and clicks "Save changes". So model looks like model.Scenarios["ID"].Expenditures["ID"].Teams["ID"]. When MVC prepares bindingContext
|
|
/// it presents each value as model.Scenarios.ID.Expenditures.ID.Teams.ID and there is no value, so it ignores.
|
|
/// But we need to have ability to get dictionary with empty dictionaries
|
|
/// </summary>
|
|
public class ActivityCalendarSaveModelBinder : JsonModelBinderBase<ActivityCalendarSaveModel>
|
|
{
|
|
}
|
|
} |