Exemple #1
0
        public override ServiceHours TranslateVmToEntity(VmSpecialHours vModel)
        {
            var entity = definitionHelper.GetDefinitionWithCreateOrUpdate(CreateViewModelEntityDefinition(vModel))
                         .AddPartial <VmHours>(input => input)
                         .AddNavigationOneMany <IDailyHours, DailyOpeningTime>(input => input, output => output.DailyOpeningTimes)
                         .GetFinal();

            return(entity);
        }
Exemple #2
0
        public override ServiceChannelVersioned TranslateVmToEntity(VmLocationChannel vModel)
        {
            var definition = definitionHelper.GetDefinitionWithCreateOrUpdate(CreateViewModelEntityDefinition(vModel))
                             // .UseVersioning<ServiceChannelVersioned, ServiceChannel>(o => o)
                             .AddLanguageAvailability(o => o)
                             .AddSimple(i => typesCache.Get <ServiceChannelType>(ServiceChannelTypeEnum.ServiceLocation.ToString()), o => o.TypeId)
                             .AddPartial(i => i.Step1Form)
                             .AddPartial(i => i.Step4Form);

            return(definition
                   .GetFinal());
        }