├── .gitattributes ├── .gitignore ├── DynamicMVC.Annotations ├── DynamicEntityAttribute.cs ├── DynamicFilterAutoCompleteAttribute.cs ├── DynamicFilterBooleanAttribute.cs ├── DynamicFilterContainsTextBoxAttribute.cs ├── DynamicFilterDateRangeAttribute.cs ├── DynamicFilterDateTimeAttribute.cs ├── DynamicFilterDropDownAttribute.cs ├── DynamicFilterExactMatchTextBoxAttribute.cs ├── DynamicFilterUIHintAttribute.cs ├── DynamicHeaderAttribute.cs ├── DynamicMVC.Annotations.csproj ├── DynamicMenuItemAttribute.cs ├── DynamicMenuItemExcludeAttribute.cs ├── DynamicMethodAttribute.cs ├── DynamicSortNoneAttribute.cs ├── Enums │ └── TemplateTypeEnum.cs ├── Properties │ └── AssemblyInfo.cs └── packages.config ├── DynamicMVC.ApplicationMetadataLibrary ├── ApplicationMetadataManager.cs ├── Builders │ ├── ApplicationControllerMetadataBuilder.cs │ ├── ApplicationControllerMethodMetadataBuilder.cs │ ├── ApplicationEntityBuilder.cs │ ├── ApplicationEntityMetadataBuilder.cs │ ├── ApplicationEntityMetadataPropertyBuilder.cs │ └── ReflectedClassesBuilder.cs ├── Diagrams │ └── ClassDiagram.cd ├── DynamicMVC.ApplicationMetadataLibrary.csproj ├── Extensions │ └── PropertyInfoExtensions.cs ├── Interfaces │ ├── IApplicationControllerMetadataBuilder.cs │ ├── IApplicationControllerMethodMetadataBuilder.cs │ ├── IApplicationEntityBuilder.cs │ ├── IApplicationEntityMetadataBuilder.cs │ ├── IApplicationEntityMetadataPropertyBuilder.cs │ ├── IApplicationMetadataManager.cs │ ├── IApplicationMetadataProviderValidator.cs │ ├── IApplicationMetadataSummaryPreValidateProcess.cs │ ├── IApplicationMetadataSummaryValidator.cs │ ├── IApplicationMetadataValidationManager.cs │ ├── IReflectedClassesBuilder.cs │ ├── ISimpleTypeParser.cs │ └── ITypeManager.cs ├── Managers │ ├── ApplicationMetadataValidationManager.cs │ └── TypeManager.cs ├── Models │ ├── ApplicationControllerMetadata.cs │ ├── ApplicationControllerMethodMetadata.cs │ ├── ApplicationEntity.cs │ ├── ApplicationEntityMetadata.cs │ ├── ApplicationEntityMetadataProperty.cs │ ├── ApplicationEntityProperty.cs │ └── ApplicationMetadataSummary.cs ├── Properties │ └── AssemblyInfo.cs ├── Strategies │ ├── ApplicationMetadataProviderValidators │ │ ├── DynamicEntityAttributeIsNotDuplicated.cs │ │ ├── SimpleTypeParsersAreUnique.cs │ │ └── TypesAreNotEmpty.cs │ ├── ApplicationMetadataSummaryPreValidateProcesses │ │ └── FixUpApplicationControllerMetadataProcess.cs │ ├── ApplicationMetadataSummaryValidators │ │ └── EveryMetadataHasMatchingEntity.cs │ └── SimpleTypeParsers │ │ ├── SimpleTypeBoolNullableParser.cs │ │ ├── SimpleTypeBoolParser.cs │ │ ├── SimpleTypeByteNullableParser.cs │ │ ├── SimpleTypeByteParser.cs │ │ ├── SimpleTypeCharNullableParser.cs │ │ ├── SimpleTypeCharParser.cs │ │ ├── SimpleTypeDateTimeNullableParser.cs │ │ ├── SimpleTypeDateTimeParser.cs │ │ ├── SimpleTypeDecimalNullableParser.cs │ │ ├── SimpleTypeDecimalParser.cs │ │ ├── SimpleTypeDoubleNullableParser.cs │ │ ├── SimpleTypeDoubleParser.cs │ │ ├── SimpleTypeFloatNullableParser.cs │ │ ├── SimpleTypeFloatParser.cs │ │ ├── SimpleTypeGuidNullableParser.cs │ │ ├── SimpleTypeGuidParser.cs │ │ ├── SimpleTypeInt16NullableParser.cs │ │ ├── SimpleTypeInt16Parser.cs │ │ ├── SimpleTypeInt32NullableParser.cs │ │ ├── SimpleTypeInt32Parser.cs │ │ ├── SimpleTypeInt64NullableParser.cs │ │ ├── SimpleTypeInt64Parser.cs │ │ ├── SimpleTypeSByteNullableParser.cs │ │ ├── SimpleTypeSByteParser.cs │ │ ├── SimpleTypeStringParser.cs │ │ ├── SimpleTypeUInt16NullableParser.cs │ │ ├── SimpleTypeUInt16Parser.cs │ │ ├── SimpleTypeUInt32NullableParser.cs │ │ ├── SimpleTypeUInt32Parser.cs │ │ ├── SimpleTypeUInt64NullableParser.cs │ │ └── SimpleTypeUInt64Parser.cs ├── UnityConfig.cs └── packages.config ├── DynamicMVC.ApplicationMetadataLibraryTest ├── DynamicMVC.ApplicationMetadataLibraryTest.csproj ├── IntegrationTests │ └── Managers │ │ └── ApplicationMetadataManagerTest.cs ├── Properties │ └── AssemblyInfo.cs ├── UnitTestHelpers │ └── ClassesForParsing.cs ├── UnitTests │ └── Strategies │ │ └── SimpleTypeParsers │ │ └── SimpleTypeNullableParserTest.cs └── packages.config ├── DynamicMVC.Data ├── App.config ├── CreateDbContextManager.cs ├── DynamicLinq.cs ├── DynamicMVC.Data.csproj ├── DynamicRepository.cs ├── Interfaces │ ├── ICreateDbContextManager.cs │ └── IDynamicRepository.cs ├── Properties │ └── AssemblyInfo.cs ├── UnityConfig.cs └── packages.config ├── DynamicMVC.DynamicEntityMetadataLibrary ├── Builders │ ├── DynamicEntityMetadataBuilder.cs │ └── DynamicPropertyMetadataBuilder.cs ├── Diagrams │ └── ClassDiagram.cd ├── DynamicEntityMetadataManager.cs ├── DynamicMVC.DynamicEntityMetadataLibrary.csproj ├── Interfaces │ ├── IDynamicEntityMetadataBuilder.cs │ ├── IDynamicEntityMetadataManager.cs │ ├── IDynamicEntityMetadataPropertyFixup.cs │ ├── IDynamicEntityMetadataValidator.cs │ ├── IDynamicMethodInvoker.cs │ ├── IDynamicMethodManager.cs │ ├── IDynamicOperationManager.cs │ ├── IDynamicPropertyMetadataBuilder.cs │ ├── INavigationPropertyManager.cs │ ├── IReflectedDynamicClass.cs │ └── IReflectionManager.cs ├── Managers │ ├── DynamicMethodManager.cs │ ├── DynamicOperationManager.cs │ ├── NavigationPropertyManager.cs │ └── ReflectionManager.cs ├── Models │ ├── DynamicCollectionEntityPropertyMetadata.cs │ ├── DynamicComplexPropertyMetadata.cs │ ├── DynamicEntityMetadata.cs │ ├── DynamicForiegnKeyPropertyMetadata.cs │ ├── DynamicMenuInfo.cs │ ├── DynamicMethod.cs │ ├── DynamicOperation.cs │ ├── DynamicPropertyMetadata.cs │ └── ReflectedDynamicClass.cs ├── Properties │ └── AssemblyInfo.cs ├── Strategies │ ├── DynamicEntityMetadataFixups │ │ ├── DynamicCollectionEntityPropertyMetadataFixup.cs │ │ ├── DynamicComplexEntityPropertyMetadataFixup.cs │ │ └── DynamicForiegnKeyPropertyMetadataFixup.cs │ └── DynamicEntityMetadataValidators │ │ └── CRUDPropertiesValidator.cs ├── UnityConfig.cs └── packages.config ├── DynamicMVC.EntityMetadataLibrary ├── Builders │ ├── EntityMetadataBuilder.cs │ └── EntityPropertyMetadataBuilder.cs ├── Diagrams │ └── ClassDiagram.cd ├── DynamicMVC.EntityMetadataLibrary.csproj ├── EntityMetadataManager.cs ├── Interfaces │ ├── IEntityMetadataBuilder.cs │ ├── IEntityMetadataManager.cs │ └── IEntityPropertyMetadataBuilder.cs ├── Models │ ├── EntityMetadata.cs │ └── EntityPropertyMetadata.cs ├── Properties │ └── AssemblyInfo.cs ├── UnityConfig.cs └── packages.config ├── DynamicMVC.EntityMetadataLibraryTest ├── ApplicationMetadataProviderTest.cs ├── DynamicMVC.EntityMetadataLibraryTest.csproj ├── Properties │ └── AssemblyInfo.cs └── packages.config ├── DynamicMVC.Shared ├── Container.cs ├── DynamicMVC.Shared.csproj ├── Enums │ └── MessageTypeEnum.cs ├── Extensions │ ├── AttributeExtensions.cs │ ├── ICollectionExtensions.cs │ ├── StringExtensions.cs │ ├── TypeExtensions.cs │ └── UnityExtensions.cs ├── Interfaces │ ├── IApplicationMetadataProvider.cs │ ├── IApplicationReflectionProvider.cs │ ├── INamingConventionManager.cs │ ├── IPropertyFilterManager.cs │ ├── IPropertyWithPropertyName.cs │ └── IValidationManager.cs ├── Managers │ ├── NamingConventionManager.cs │ ├── PropertyFilterManager.cs │ └── ValidationManager.cs ├── Models │ └── ApplicationMetadataProvider.cs ├── Properties │ └── AssemblyInfo.cs ├── UnityConfig.cs └── packages.config ├── DynamicMVC.UI ├── App_Data │ ├── aspnet-DynamicMVC.UI-20140716102202.mdf │ └── aspnet-DynamicMVC.UI-20140716102202_log.ldf ├── App_Start │ ├── BundleConfig.cs │ ├── FilterConfig.cs │ ├── IdentityConfig.cs │ ├── RouteConfig.cs │ ├── Startup.Auth.cs │ ├── UnityConfig.cs │ └── UnityMvcActivator.cs ├── Content │ ├── DynamicStyle.css │ ├── Site.css │ ├── Validation.css │ ├── bootstrap.css │ ├── bootstrap.min.css │ ├── css │ │ ├── select2-spinner.gif │ │ ├── select2.css │ │ ├── select2.png │ │ └── select2x2.png │ ├── select2custom.css │ └── themes │ │ └── base │ │ ├── accordion.css │ │ ├── all.css │ │ ├── autocomplete.css │ │ ├── base.css │ │ ├── button.css │ │ ├── core.css │ │ ├── datepicker.css │ │ ├── dialog.css │ │ ├── draggable.css │ │ ├── images │ │ ├── ui-bg_flat_0_aaaaaa_40x100.png │ │ ├── ui-bg_flat_75_ffffff_40x100.png │ │ ├── ui-bg_glass_55_fbf9ee_1x400.png │ │ ├── ui-bg_glass_65_ffffff_1x400.png │ │ ├── ui-bg_glass_75_dadada_1x400.png │ │ ├── ui-bg_glass_75_e6e6e6_1x400.png │ │ ├── ui-bg_glass_95_fef1ec_1x400.png │ │ ├── ui-bg_highlight-soft_75_cccccc_1x100.png │ │ ├── ui-icons_222222_256x240.png │ │ ├── ui-icons_2e83ff_256x240.png │ │ ├── ui-icons_454545_256x240.png │ │ ├── ui-icons_888888_256x240.png │ │ └── ui-icons_cd0a0a_256x240.png │ │ ├── menu.css │ │ ├── progressbar.css │ │ ├── resizable.css │ │ ├── selectable.css │ │ ├── selectmenu.css │ │ ├── slider.css │ │ ├── sortable.css │ │ ├── spinner.css │ │ ├── tabs.css │ │ ├── theme.css │ │ └── tooltip.css ├── Controllers │ ├── AccountController.cs │ ├── DynamicController.cs │ ├── HomeController.cs │ └── ManageController.cs ├── DynamicMVC.UI.csproj ├── DynamicMVC │ ├── CorrectQueryStringTypesActionFilter.cs │ ├── DynamicControllerBase.cs │ ├── DynamicMVCContext.cs │ ├── DynamicMVCContextOptions.cs │ ├── DynamicMVCUnityConfig.cs │ ├── Extensions │ │ └── RouteValueExtensions.cs │ ├── Factories │ │ └── DynamicFilterFactory.cs │ ├── Helpers │ │ └── Helpers.cs │ ├── Interfaces │ │ ├── IDynamicCreateViewModelBuilder.cs │ │ ├── IDynamicDeleteViewModelBuilder.cs │ │ ├── IDynamicDetailsViewModelBuilder.cs │ │ ├── IDynamicDisplayName.cs │ │ ├── IDynamicDisplayPartialModelBuilder.cs │ │ ├── IDynamicEditViewModelBuilder.cs │ │ ├── IDynamicEditorModelBuilder.cs │ │ ├── IDynamicEntitySearchManager.cs │ │ ├── IDynamicFilter.cs │ │ ├── IDynamicFilterFactory.cs │ │ ├── IDynamicFilterManager.cs │ │ ├── IDynamicIndexPageViewModelBuilder.cs │ │ ├── IDynamicIndexViewModelBuilder.cs │ │ ├── IDynamicMVCManager.cs │ │ ├── IDynamicPropertyViewModelBuilder.cs │ │ ├── IPagingManager.cs │ │ ├── IRequestManager.cs │ │ ├── IReturnUrlManager.cs │ │ ├── ISelectListItemManager.cs │ │ └── IUrlManager.cs │ ├── Managers │ │ ├── DynamicEntitySearchManager.cs │ │ ├── DynamicFilterManager.cs │ │ ├── DynamicMvcManager.cs │ │ ├── PagingManager.cs │ │ ├── RequestManager.cs │ │ ├── ReturnUrlManager.cs │ │ ├── SelectListItemManager.cs │ │ └── UrlManager.cs │ ├── RouteValueDictionaryWrapper.cs │ ├── Strategies │ │ ├── DynamicDisplayPartialModelBuilders │ │ │ └── DynamicDisplayHyperlinkModelBuilder.cs │ │ ├── DynamicEditorModelBuilders │ │ │ ├── DynamicEditorAutoCompleteBuilder.cs │ │ │ ├── DynamicEditorDropDownModelBuilder.cs │ │ │ └── DynamicEditorHyperlinkBuilder.cs │ │ └── DynamicMethodInvoker │ │ │ └── EmptyDynamicMethodInvoker.cs │ ├── ViewModelBuilders │ │ ├── DynamicCreateViewModelBuilder.cs │ │ ├── DynamicDeleteViewModelBuilder.cs │ │ ├── DynamicDetailsViewModelBuilder.cs │ │ ├── DynamicEditViewModelBuilder.cs │ │ ├── DynamicIndexPageViewModelBuilder.cs │ │ ├── DynamicIndexViewModelBuilder.cs │ │ └── DynamicPropertyViewModelBuilder.cs │ └── ViewModels │ │ ├── DynamicControls │ │ ├── DynamicEditorViewModel.cs │ │ ├── DynamicTableHeaderViewModel.cs │ │ └── MessageViewModel.cs │ │ ├── DynamicCreateViewModel.cs │ │ ├── DynamicDeleteViewModel.cs │ │ ├── DynamicDetailsViewModel.cs │ │ ├── DynamicEditViewModel.cs │ │ ├── DynamicEditorViewModels │ │ ├── DynamicEditorAutoCompleteViewModel.cs │ │ ├── DynamicEditorDropDownViewModel.cs │ │ └── DynamicEditorHyperlinkViewModel.cs │ │ ├── DynamicFilterViewModels │ │ ├── DynamicFilterAutoCompleteViewModel.cs │ │ ├── DynamicFilterBaseViewModel.cs │ │ ├── DynamicFilterBooleanViewModel.cs │ │ ├── DynamicFilterContainsTextBoxViewModel.cs │ │ ├── DynamicFilterDateRangeViewModel.cs │ │ ├── DynamicFilterDateTimeViewModel.cs │ │ ├── DynamicFilterDropDownViewModel.cs │ │ └── DynamicFilterExactMatchTextBoxViewModel.cs │ │ ├── DynamicIndexItemViewModel.cs │ │ ├── DynamicIndexMobileItemViewModel.cs │ │ ├── DynamicIndexPageViewModel.cs │ │ ├── DynamicIndexViewModel.cs │ │ ├── DynamicMenuItemViewModel.cs │ │ ├── DynamicPropertyViewModels │ │ ├── DynamicFilterViewModel.cs │ │ ├── DynamicPropertyEditorViewModel.cs │ │ ├── DynamicPropertyIndexViewModel.cs │ │ └── DynamicPropertyViewModel.cs │ │ └── Partials │ │ └── DynamicIndexFiltersViewModel.cs ├── Global.asax ├── Global.asax.cs ├── Migrations │ ├── 201407201607301_initial.Designer.cs │ ├── 201407201607301_initial.cs │ ├── 201407201607301_initial.resx │ ├── 201407201609255_customerandproduct.Designer.cs │ ├── 201407201609255_customerandproduct.cs │ ├── 201407201609255_customerandproduct.resx │ ├── 201407201903537_customerregion.Designer.cs │ ├── 201407201903537_customerregion.cs │ ├── 201407201903537_customerregion.resx │ ├── 201407261402330_addedorder.Designer.cs │ ├── 201407261402330_addedorder.cs │ ├── 201407261402330_addedorder.resx │ ├── 201407261420404_modifiedproduct.Designer.cs │ ├── 201407261420404_modifiedproduct.cs │ ├── 201407261420404_modifiedproduct.resx │ ├── 201407271546462_orderstatus.Designer.cs │ ├── 201407271546462_orderstatus.cs │ ├── 201407271546462_orderstatus.resx │ ├── 201601162209172_ishotorder.Designer.cs │ ├── 201601162209172_ishotorder.cs │ ├── 201601162209172_ishotorder.resx │ ├── 201602190308519_hotorderl.Designer.cs │ ├── 201602190308519_hotorderl.cs │ ├── 201602190308519_hotorderl.resx │ ├── 201602211514393_requesteddatetime.Designer.cs │ ├── 201602211514393_requesteddatetime.cs │ ├── 201602211514393_requesteddatetime.resx │ ├── 201602211555076_notes.Designer.cs │ ├── 201602211555076_notes.cs │ ├── 201602211555076_notes.resx │ └── Configuration.cs ├── Models │ ├── AccountViewModels.cs │ ├── Customer.cs │ ├── CustomerRegion.cs │ ├── IdentityModels.cs │ ├── ManageViewModels.cs │ ├── Order.cs │ ├── OrderLine.cs │ ├── OrderStatus.cs │ ├── OrderType.cs │ └── Product.cs ├── Project_Readme.html ├── Properties │ └── AssemblyInfo.cs ├── Scripts │ ├── DynamicScript.js │ ├── Select2-locales │ │ ├── select2_locale_ar.js │ │ ├── select2_locale_az.js │ │ ├── select2_locale_bg.js │ │ ├── select2_locale_ca.js │ │ ├── select2_locale_cs.js │ │ ├── select2_locale_da.js │ │ ├── select2_locale_de.js │ │ ├── select2_locale_el.js │ │ ├── select2_locale_es.js │ │ ├── select2_locale_et.js │ │ ├── select2_locale_eu.js │ │ ├── select2_locale_fa.js │ │ ├── select2_locale_fi.js │ │ ├── select2_locale_fr.js │ │ ├── select2_locale_gl.js │ │ ├── select2_locale_he.js │ │ ├── select2_locale_hr.js │ │ ├── select2_locale_hu.js │ │ ├── select2_locale_id.js │ │ ├── select2_locale_is.js │ │ ├── select2_locale_it.js │ │ ├── select2_locale_ja.js │ │ ├── select2_locale_ka.js │ │ ├── select2_locale_ko.js │ │ ├── select2_locale_lt.js │ │ ├── select2_locale_lv.js │ │ ├── select2_locale_mk.js │ │ ├── select2_locale_ms.js │ │ ├── select2_locale_nl.js │ │ ├── select2_locale_no.js │ │ ├── select2_locale_pl.js │ │ ├── select2_locale_pt-BR.js │ │ ├── select2_locale_pt-PT.js │ │ ├── select2_locale_ro.js │ │ ├── select2_locale_rs.js │ │ ├── select2_locale_ru.js │ │ ├── select2_locale_sk.js │ │ ├── select2_locale_sv.js │ │ ├── select2_locale_th.js │ │ ├── select2_locale_tr.js │ │ ├── select2_locale_ua.js │ │ ├── select2_locale_uk.js │ │ ├── select2_locale_vi.js │ │ ├── select2_locale_zh-CN.js │ │ └── select2_locale_zh-TW.js │ ├── _references.js │ ├── bootstrap.js │ ├── bootstrap.min.js │ ├── jquery-1.10.2.intellisense.js │ ├── jquery-1.10.2.js │ ├── jquery-1.10.2.min.js │ ├── jquery-1.10.2.min.map │ ├── jquery-ui-1.11.1.js │ ├── jquery-ui.min-1.11.1.js │ ├── jquery.unobtrusive-ajax.js │ ├── jquery.unobtrusive-ajax.min.js │ ├── jquery.validate-vsdoc.js │ ├── jquery.validate.js │ ├── jquery.validate.min.js │ ├── jquery.validate.unobtrusive.js │ ├── jquery.validate.unobtrusive.min.js │ ├── modernizr-2.6.2.js │ ├── respond.js │ ├── respond.min.js │ ├── select2.js │ └── select2.min.js ├── Startup.cs ├── Views │ ├── Account │ │ ├── ConfirmEmail.cshtml │ │ ├── ExternalLoginConfirmation.cshtml │ │ ├── ExternalLoginFailure.cshtml │ │ ├── ForgotPassword.cshtml │ │ ├── ForgotPasswordConfirmation.cshtml │ │ ├── Login.cshtml │ │ ├── Register.cshtml │ │ ├── ResetPassword.cshtml │ │ ├── ResetPasswordConfirmation.cshtml │ │ ├── SendCode.cshtml │ │ ├── VerifyCode.cshtml │ │ └── _ExternalLoginsListPartial.cshtml │ ├── Home │ │ ├── About.cshtml │ │ ├── Contact.cshtml │ │ └── Index.cshtml │ ├── Manage │ │ ├── AddPhoneNumber.cshtml │ │ ├── ChangePassword.cshtml │ │ ├── Index.cshtml │ │ ├── ManageLogins.cshtml │ │ ├── SetPassword.cshtml │ │ └── VerifyPhoneNumber.cshtml │ ├── Shared │ │ ├── DynamicControls │ │ │ ├── _DisplayMessage.cshtml │ │ │ ├── _DynamicTableHeader.cshtml │ │ │ ├── _NextDesktopButton.cshtml │ │ │ ├── _NextMobileButton.cshtml │ │ │ ├── _PreviousDesktopButton.cshtml │ │ │ └── _PreviousMobileButton.cshtml │ │ ├── DynamicCreate.cshtml │ │ ├── DynamicDelete.cshtml │ │ ├── DynamicDetails.cshtml │ │ ├── DynamicDisplayPartials │ │ │ ├── _DynamicDisplay.cshtml │ │ │ └── _DynamicDisplayHyperlink.cshtml │ │ ├── DynamicEdit.cshtml │ │ ├── DynamicFilters │ │ │ ├── DynamicFilterAutoComplete.cshtml │ │ │ ├── DynamicFilterBoolean.cshtml │ │ │ ├── DynamicFilterContainsTextBox.cshtml │ │ │ ├── DynamicFilterDateRange.cshtml │ │ │ ├── DynamicFilterDateTime.cshtml │ │ │ ├── DynamicFilterDropDown.cshtml │ │ │ └── DynamicFilterExactMatchTextBox.cshtml │ │ ├── DynamicIndex.cshtml │ │ ├── EditorTemplates │ │ │ ├── DynamicEditor.cshtml │ │ │ ├── DynamicEditorAutoComplete.cshtml │ │ │ ├── DynamicEditorBool.cshtml │ │ │ ├── DynamicEditorBoolNullable.cshtml │ │ │ ├── DynamicEditorDateTime.cshtml │ │ │ ├── DynamicEditorDropDown.cshtml │ │ │ ├── DynamicEditorHidden.cshtml │ │ │ ├── DynamicEditorHyperlink.cshtml │ │ │ ├── DynamicEditorMultiLine.cshtml │ │ │ ├── DynamicEditorMultiLineReadonly.cshtml │ │ │ ├── DynamicEditorPassword.cshtml │ │ │ └── DynamicEditorReadOnly.cshtml │ │ ├── Error.cshtml │ │ ├── Lockout.cshtml │ │ ├── Partials │ │ │ ├── _DynamicIndexFilters.cshtml │ │ │ ├── _DynamicIndexHeader.cshtml │ │ │ ├── _DynamicIndexItem.cshtml │ │ │ ├── _DynamicIndexMobileItem.cshtml │ │ │ └── _DynamicUIMethods.cshtml │ │ ├── _DynamicIndex.cshtml │ │ ├── _Layout.cshtml │ │ └── _LoginPartial.cshtml │ ├── Web.config │ └── _ViewStart.cshtml ├── Web.Debug.config ├── Web.Release.config ├── Web.config ├── favicon.ico ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ └── glyphicons-halflings-regular.woff └── packages.config ├── DynamicMVC.sln ├── LICENSE.md ├── NuGet.Packager ├── NuGet.Packager.csproj ├── NuGet.config ├── NuGet.exe ├── NuGetPackage.ps1 ├── NuGetSetup.ps1 ├── Package.nuspec ├── Properties │ └── AssemblyInfo.cs ├── content │ └── DynamicMVC │ │ ├── CorrectQueryStringTypesActionFilter.cs │ │ ├── DynamicControllerBase.cs │ │ ├── DynamicMVCContext.cs │ │ ├── DynamicMVCContextOptions.cs │ │ ├── DynamicMVCUnityConfig.cs │ │ ├── Extensions │ │ └── RouteValueExtensions.cs │ │ ├── Factories │ │ └── DynamicFilterFactory.cs │ │ ├── Helpers │ │ └── Helpers.cs │ │ ├── Interfaces │ │ ├── IDynamicCreateViewModelBuilder.cs │ │ ├── IDynamicDeleteViewModelBuilder.cs │ │ ├── IDynamicDetailsViewModelBuilder.cs │ │ ├── IDynamicDisplayName.cs │ │ ├── IDynamicDisplayPartialModelBuilder.cs │ │ ├── IDynamicEditViewModelBuilder.cs │ │ ├── IDynamicEditorModelBuilder.cs │ │ ├── IDynamicEntitySearchManager.cs │ │ ├── IDynamicFilter.cs │ │ ├── IDynamicFilterFactory.cs │ │ ├── IDynamicFilterManager.cs │ │ ├── IDynamicIndexPageViewModelBuilder.cs │ │ ├── IDynamicIndexViewModelBuilder.cs │ │ ├── IDynamicMVCManager.cs │ │ ├── IDynamicPropertyViewModelBuilder.cs │ │ ├── IPagingManager.cs │ │ ├── IRequestManager.cs │ │ ├── IReturnUrlManager.cs │ │ ├── ISelectListItemManager.cs │ │ └── IUrlManager.cs │ │ ├── Managers │ │ ├── DynamicEntitySearchManager.cs │ │ ├── DynamicFilterManager.cs │ │ ├── DynamicMvcManager.cs │ │ ├── PagingManager.cs │ │ ├── RequestManager.cs │ │ ├── ReturnUrlManager.cs │ │ ├── SelectListItemManager.cs │ │ └── UrlManager.cs │ │ ├── RouteValueDictionaryWrapper.cs │ │ ├── Strategies │ │ ├── DynamicDisplayPartialModelBuilders │ │ │ └── DynamicDisplayHyperlinkModelBuilder.cs │ │ ├── DynamicEditorModelBuilders │ │ │ ├── DynamicEditorAutoCompleteBuilder.cs │ │ │ ├── DynamicEditorDropDownModelBuilder.cs │ │ │ └── DynamicEditorHyperlinkBuilder.cs │ │ └── DynamicMethodInvoker │ │ │ └── EmptyDynamicMethodInvoker.cs │ │ ├── ViewModelBuilders │ │ ├── DynamicCreateViewModelBuilder.cs │ │ ├── DynamicDeleteViewModelBuilder.cs │ │ ├── DynamicDetailsViewModelBuilder.cs │ │ ├── DynamicEditViewModelBuilder.cs │ │ ├── DynamicIndexPageViewModelBuilder.cs │ │ ├── DynamicIndexViewModelBuilder.cs │ │ └── DynamicPropertyViewModelBuilder.cs │ │ └── ViewModels │ │ ├── DynamicControls │ │ ├── DynamicEditorViewModel.cs │ │ ├── DynamicTableHeaderViewModel.cs │ │ └── MessageViewModel.cs │ │ ├── DynamicCreateViewModel.cs │ │ ├── DynamicDeleteViewModel.cs │ │ ├── DynamicDetailsViewModel.cs │ │ ├── DynamicEditViewModel.cs │ │ ├── DynamicEditorViewModels │ │ ├── DynamicEditorAutoCompleteViewModel.cs │ │ ├── DynamicEditorDropDownViewModel.cs │ │ └── DynamicEditorHyperlinkViewModel.cs │ │ ├── DynamicFilterViewModels │ │ ├── DynamicFilterAutoCompleteViewModel.cs │ │ ├── DynamicFilterBaseViewModel.cs │ │ ├── DynamicFilterBooleanViewModel.cs │ │ ├── DynamicFilterContainsTextBoxViewModel.cs │ │ ├── DynamicFilterDateRangeViewModel.cs │ │ ├── DynamicFilterDateTimeViewModel.cs │ │ ├── DynamicFilterDropDownViewModel.cs │ │ └── DynamicFilterExactMatchTextBoxViewModel.cs │ │ ├── DynamicIndexItemViewModel.cs │ │ ├── DynamicIndexMobileItemViewModel.cs │ │ ├── DynamicIndexPageViewModel.cs │ │ ├── DynamicIndexViewModel.cs │ │ ├── DynamicMenuItemViewModel.cs │ │ ├── DynamicPropertyViewModels │ │ ├── DynamicFilterViewModel.cs │ │ ├── DynamicPropertyEditorViewModel.cs │ │ ├── DynamicPropertyIndexViewModel.cs │ │ └── DynamicPropertyViewModel.cs │ │ └── Partials │ │ └── DynamicIndexFiltersViewModel.cs ├── lib │ └── DynamicMVC.Data.dll └── tools │ ├── init.ps1 │ ├── install.ps1 │ └── uninstall.ps1 ├── ReflectionLibrary ├── Builders │ ├── ReflectedClassBuilder.cs │ ├── ReflectedMethodBuilder.cs │ └── ReflectedPropertyBuilder.cs ├── Enums │ └── SimpleTypeEnum.cs ├── Extensions │ ├── ReflectedObjectWithAttributesExtensions.cs │ └── UnityExtensions.cs ├── Interfaces │ ├── IAttributeMergeManager.cs │ ├── ICustomAttributeProviderManager.cs │ ├── IPropertyTypeManager.cs │ ├── IReflectedClass.cs │ ├── IReflectedClassBuilder.cs │ ├── IReflectedClassOperations.cs │ ├── IReflectedLibraryManager.cs │ ├── IReflectedMethod.cs │ ├── IReflectedMethodBuilder.cs │ ├── IReflectedMethodOperations.cs │ ├── IReflectedObject.cs │ ├── IReflectedObjectWithAttributes.cs │ ├── IReflectedProperty.cs │ ├── IReflectedPropertyBuilder.cs │ ├── IReflectedPropertyOperations.cs │ └── ISimpleTypeParser.cs ├── Managers │ ├── AttributeMergeManager.cs │ ├── CustomAttributeProviderManager.cs │ ├── PropertyTypeManager.cs │ └── ReflectionLibraryManager.cs ├── Models │ ├── ReflectedClass.cs │ ├── ReflectedClassOperations.cs │ ├── ReflectedMethod.cs │ ├── ReflectedMethodOperations.cs │ ├── ReflectedProperty.cs │ └── ReflectedPropertyOperations.cs ├── Properties │ └── AssemblyInfo.cs ├── ReflectionLibrary.csproj ├── Strategies │ └── SimpleTypeParsers │ │ ├── SimpleTypeBoolNullableParser.cs │ │ ├── SimpleTypeBoolParser.cs │ │ ├── SimpleTypeByteNullableParser.cs │ │ ├── SimpleTypeByteParser.cs │ │ ├── SimpleTypeCharNullableParser.cs │ │ ├── SimpleTypeCharParser.cs │ │ ├── SimpleTypeDateTimeNullableParser.cs │ │ ├── SimpleTypeDateTimeParser.cs │ │ ├── SimpleTypeDecimalNullableParser.cs │ │ ├── SimpleTypeDecimalParser.cs │ │ ├── SimpleTypeDoubleNullableParser.cs │ │ ├── SimpleTypeDoubleParser.cs │ │ ├── SimpleTypeFloatNullableParser.cs │ │ ├── SimpleTypeFloatParser.cs │ │ ├── SimpleTypeGuidNullableParser.cs │ │ ├── SimpleTypeGuidParser.cs │ │ ├── SimpleTypeInt16NullableParser.cs │ │ ├── SimpleTypeInt16Parser.cs │ │ ├── SimpleTypeInt32NullableParser.cs │ │ ├── SimpleTypeInt32Parser.cs │ │ ├── SimpleTypeInt64NullableParser.cs │ │ ├── SimpleTypeInt64Parser.cs │ │ ├── SimpleTypeSByteNullableParser.cs │ │ ├── SimpleTypeSByteParser.cs │ │ ├── SimpleTypeStringParser.cs │ │ ├── SimpleTypeUInt16NullableParser.cs │ │ ├── SimpleTypeUInt16Parser.cs │ │ ├── SimpleTypeUInt32NullableParser.cs │ │ ├── SimpleTypeUInt32Parser.cs │ │ ├── SimpleTypeUInt64NullableParser.cs │ │ └── SimpleTypeUInt64Parser.cs ├── UnityConfig.cs └── packages.config └── ReflectionLibraryTests ├── Builders └── ReflectedPropertyBuilderTests.cs ├── Properties └── AssemblyInfo.cs └── ReflectionLibraryTests.csproj /DynamicMVC.Annotations/DynamicFilterAutoCompleteAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace DynamicMVC.Annotations 4 | { 5 | public class DynamicFilterAutoCompleteAttribute : DynamicFilterUIHintAttribute 6 | { 7 | public DynamicFilterAutoCompleteAttribute(string labelText, string queryStringName, Type type, string valueMember, string displayMember) 8 | : base("DynamicFilterAutoComplete", "DynamicFilterAutoCompleteViewModel" 9 | , "LabelText", labelText 10 | , "QueryStringName", queryStringName 11 | , "Type", type 12 | , "ValueMember", valueMember 13 | , "DisplayMember", displayMember) 14 | { 15 | 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /DynamicMVC.Annotations/DynamicFilterBooleanAttribute.cs: -------------------------------------------------------------------------------- 1 | namespace DynamicMVC.Annotations 2 | { 3 | public class DynamicFilterBooleanAttribute : DynamicFilterUIHintAttribute 4 | { 5 | public DynamicFilterBooleanAttribute() : base("DynamicFilterBoolean", "DynamicFilterBooleanViewModel") 6 | { 7 | 8 | } 9 | 10 | public DynamicFilterBooleanAttribute(string labelText, string queryStringName, string nullText) 11 | : base("DynamicFilterBoolean", "DynamicFilterBooleanViewModel" 12 | , "LabelText", labelText 13 | , "QueryStringName", queryStringName 14 | , "NullText", nullText) 15 | { 16 | 17 | } 18 | 19 | 20 | 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /DynamicMVC.Annotations/DynamicFilterContainsTextBoxAttribute.cs: -------------------------------------------------------------------------------- 1 | namespace DynamicMVC.Annotations 2 | { 3 | public class DynamicFilterContainsTextBoxAttribute : DynamicFilterUIHintAttribute 4 | { 5 | public DynamicFilterContainsTextBoxAttribute(string labelText, string queryStringName) 6 | : base("DynamicFilterContainsTextBox", "DynamicFilterContainsTextBoxViewModel" 7 | , "LabelText", labelText 8 | , "QueryStringName", queryStringName) 9 | { 10 | 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /DynamicMVC.Annotations/DynamicFilterDateRangeAttribute.cs: -------------------------------------------------------------------------------- 1 | namespace DynamicMVC.Annotations 2 | { 3 | public class DynamicFilterDateRangeAttribute : DynamicFilterUIHintAttribute 4 | { 5 | public DynamicFilterDateRangeAttribute(string startLabel, string endLabel 6 | , string startQueryStringName, string endQueryStringName, int addDays) 7 | : base("DynamicFilterDateRange", "DynamicFilterDateRangeViewModel" 8 | , "StartLabel", startLabel 9 | , "EndLabel", endLabel 10 | , "StartQueryStringName", startQueryStringName 11 | , "EndQueryStringName", endQueryStringName 12 | , "AddDays", addDays) 13 | { } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /DynamicMVC.Annotations/DynamicFilterDateTimeAttribute.cs: -------------------------------------------------------------------------------- 1 | namespace DynamicMVC.Annotations 2 | { 3 | public class DynamicFilterDateTimeAttribute : DynamicFilterUIHintAttribute 4 | { 5 | public DynamicFilterDateTimeAttribute(string labelText, string queryStringName, int addDays) 6 | :base("DynamicFilterDateTime", "DynamicFilterDateTimeViewModel", "LabelText", labelText, "QueryStringName", queryStringName, "AddDays", addDays) 7 | { 8 | 9 | } 10 | 11 | public DynamicFilterDateTimeAttribute(int addDays) 12 | : base("DynamicFilterDateTime", "DynamicFilterDateTimeViewModel", "AddDays", addDays) 13 | { 14 | 15 | } 16 | 17 | public DynamicFilterDateTimeAttribute(string labelText, int addDays) 18 | : base("DynamicFilterDateTime", "DynamicFilterDateTimeViewModel", "LabelText", labelText, "AddDays", addDays) 19 | { 20 | 21 | } 22 | 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /DynamicMVC.Annotations/DynamicFilterDropDownAttribute.cs: -------------------------------------------------------------------------------- 1 | namespace DynamicMVC.Annotations 2 | { 3 | public class DynamicFilterDropDownAttribute : DynamicFilterUIHintAttribute 4 | { 5 | public DynamicFilterDropDownAttribute(string labelText) 6 | : base("DynamicFilterDropDown", "DynamicFilterDropDownViewModel", "LabelText", labelText) 7 | { 8 | 9 | } 10 | 11 | public DynamicFilterDropDownAttribute(string labelText, string nullText) 12 | : base("DynamicFilterDropDown", "DynamicFilterDropDownViewModel", "LabelText", labelText, "NullText", nullText) 13 | { 14 | 15 | } 16 | 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /DynamicMVC.Annotations/DynamicFilterExactMatchTextBoxAttribute.cs: -------------------------------------------------------------------------------- 1 | namespace DynamicMVC.Annotations 2 | { 3 | public class DynamicFilterExactMatchTextBoxAttribute : DynamicFilterUIHintAttribute 4 | { 5 | public DynamicFilterExactMatchTextBoxAttribute(string labelText, string queryStringName) 6 | : base("DynamicFilterExactMatchTextBox", "DynamicFilterExactMatchTextBoxViewModel" 7 | , "LabelText", labelText 8 | , "QueryStringName", queryStringName) 9 | { 10 | 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /DynamicMVC.Annotations/DynamicHeaderAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace DynamicMVC.Annotations 4 | { 5 | public class DynamicHeaderAttribute : Attribute 6 | { 7 | public DynamicHeaderAttribute() 8 | { 9 | 10 | } 11 | public DynamicHeaderAttribute(string indexHeader, string creatHeader, string editHeader, string detailsHeader, 12 | string deleteHeader) 13 | { 14 | IndexHeader = indexHeader; 15 | CreateHeader = creatHeader; 16 | EditHeader = editHeader; 17 | DetailsHeader = detailsHeader; 18 | DeleteHeader = deleteHeader; 19 | } 20 | public string IndexHeader { get; set; } 21 | public string CreateHeader { get; set; } 22 | public string EditHeader { get; set; } 23 | public string DetailsHeader { get; set; } 24 | public string DeleteHeader { get; set; } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /DynamicMVC.Annotations/DynamicMenuItemAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace DynamicMVC.Annotations 4 | { 5 | public class DynamicMenuItemAttribute : Attribute 6 | { 7 | public DynamicMenuItemAttribute(string displayName, string categoryName) 8 | { 9 | DisplayName = displayName; 10 | CategoryName = categoryName; 11 | } 12 | 13 | public string DisplayName { get; set; } 14 | public string CategoryName { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /DynamicMVC.Annotations/DynamicMenuItemExcludeAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace DynamicMVC.Annotations 4 | { 5 | public class DynamicMenuItemExcludeAttribute : Attribute 6 | { 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /DynamicMVC.Annotations/DynamicMethodAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using DynamicMVC.Annotations.Enums; 3 | 4 | namespace DynamicMVC.Annotations 5 | { 6 | public class DynamicMethodAttribute : Attribute 7 | { 8 | public DynamicMethodAttribute() 9 | { 10 | InvokerName = "EmptyDynamicMethodInvoker"; 11 | } 12 | 13 | public string ButtonText { get; set; } 14 | public string SubmitValue { get; set; } 15 | public string RedirectUrl { get; set; } 16 | public TemplateTypeEnum TemplateTypeEnum { get; set; } 17 | public string InvokerName { get; set; } 18 | } 19 | 20 | 21 | } 22 | -------------------------------------------------------------------------------- /DynamicMVC.Annotations/DynamicSortNoneAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace DynamicMVC.Annotations 4 | { 5 | public class DynamicSortNoneAttribute : Attribute 6 | { 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /DynamicMVC.Annotations/Enums/TemplateTypeEnum.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace DynamicMVC.Annotations.Enums 4 | { 5 | /// 6 | /// Enum specifies what kind of view is being displayed to the page 7 | /// 8 | [Flags] 9 | public enum TemplateTypeEnum 10 | { 11 | /// 12 | /// DynamicIndex 13 | /// 14 | Index, 15 | /// 16 | /// DynamicCreate 17 | /// 18 | Create, 19 | /// 20 | /// DynamicEdit 21 | /// 22 | Edit, 23 | /// 24 | /// DynamicDelete 25 | /// 26 | Delete, 27 | /// 28 | /// DynamicDetails 29 | /// 30 | Details 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /DynamicMVC.Annotations/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /DynamicMVC.ApplicationMetadataLibrary/Extensions/PropertyInfoExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reflection; 3 | 4 | namespace DynamicMVC.ApplicationMetadataLibrary.Extensions 5 | { 6 | internal static class PropertyInfoExtensions 7 | { 8 | internal static dynamic GetPropertyInfoValueFunction(this PropertyInfo propertyInfo, dynamic item) 9 | { 10 | if (item == null) 11 | throw new Exception("GetPropertyInfoValueFunction should not be called with a null item passed into it."); 12 | return propertyInfo.GetValue(item); 13 | } 14 | 15 | internal static void SetPropertyInfoValueFunction(this PropertyInfo propertyInfo, dynamic item, dynamic value) 16 | { 17 | propertyInfo.SetValue(item, value); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /DynamicMVC.ApplicationMetadataLibrary/Interfaces/IApplicationControllerMetadataBuilder.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using DynamicMVC.ApplicationMetadataLibrary.Models; 3 | 4 | namespace DynamicMVC.ApplicationMetadataLibrary.Interfaces 5 | { 6 | public interface IApplicationControllerMetadataBuilder 7 | { 8 | IEnumerable Build(); 9 | } 10 | } -------------------------------------------------------------------------------- /DynamicMVC.ApplicationMetadataLibrary/Interfaces/IApplicationControllerMethodMetadataBuilder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using DynamicMVC.ApplicationMetadataLibrary.Models; 4 | 5 | namespace DynamicMVC.ApplicationMetadataLibrary.Interfaces 6 | { 7 | public interface IApplicationControllerMethodMetadataBuilder 8 | { 9 | IEnumerable Build(ApplicationControllerMetadata applicationControllerMetadata, Type type); 10 | } 11 | } -------------------------------------------------------------------------------- /DynamicMVC.ApplicationMetadataLibrary/Interfaces/IApplicationEntityBuilder.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using DynamicMVC.ApplicationMetadataLibrary.Models; 3 | 4 | namespace DynamicMVC.ApplicationMetadataLibrary.Interfaces 5 | { 6 | public interface IApplicationEntityBuilder 7 | { 8 | IEnumerable Build(IEnumerable applicationEntityMetadatas); 9 | } 10 | } -------------------------------------------------------------------------------- /DynamicMVC.ApplicationMetadataLibrary/Interfaces/IApplicationEntityMetadataBuilder.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using DynamicMVC.ApplicationMetadataLibrary.Models; 3 | 4 | namespace DynamicMVC.ApplicationMetadataLibrary.Interfaces 5 | { 6 | public interface IApplicationEntityMetadataBuilder 7 | { 8 | IEnumerable Build(); 9 | } 10 | } -------------------------------------------------------------------------------- /DynamicMVC.ApplicationMetadataLibrary/Interfaces/IApplicationEntityMetadataPropertyBuilder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using DynamicMVC.ApplicationMetadataLibrary.Models; 4 | 5 | namespace DynamicMVC.ApplicationMetadataLibrary.Interfaces 6 | { 7 | public interface IApplicationEntityMetadataPropertyBuilder 8 | { 9 | IEnumerable Build(Type type); 10 | } 11 | } -------------------------------------------------------------------------------- /DynamicMVC.ApplicationMetadataLibrary/Interfaces/IApplicationMetadataManager.cs: -------------------------------------------------------------------------------- 1 | using DynamicMVC.ApplicationMetadataLibrary.Models; 2 | 3 | namespace DynamicMVC.ApplicationMetadataLibrary.Interfaces 4 | { 5 | public interface IApplicationMetadataManager 6 | { 7 | ApplicationMetadataSummary GetApplicationMetadataSummary(); 8 | } 9 | } -------------------------------------------------------------------------------- /DynamicMVC.ApplicationMetadataLibrary/Interfaces/IApplicationMetadataProviderValidator.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.ComponentModel.DataAnnotations; 3 | using DynamicMVC.Shared.Interfaces; 4 | 5 | namespace DynamicMVC.ApplicationMetadataLibrary.Interfaces 6 | { 7 | public interface IApplicationMetadataProviderValidator 8 | { 9 | IEnumerable Validate(IApplicationMetadataProvider applicationMetadataProvider); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /DynamicMVC.ApplicationMetadataLibrary/Interfaces/IApplicationMetadataSummaryPreValidateProcess.cs: -------------------------------------------------------------------------------- 1 | using DynamicMVC.ApplicationMetadataLibrary.Models; 2 | 3 | namespace DynamicMVC.ApplicationMetadataLibrary.Interfaces 4 | { 5 | public interface IApplicationMetadataSummaryPreValidateProcess 6 | { 7 | void Process(ApplicationMetadataSummary applicationMetadataSummary); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /DynamicMVC.ApplicationMetadataLibrary/Interfaces/IApplicationMetadataSummaryValidator.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.ComponentModel.DataAnnotations; 3 | using DynamicMVC.ApplicationMetadataLibrary.Models; 4 | 5 | namespace DynamicMVC.ApplicationMetadataLibrary.Interfaces 6 | { 7 | public interface IApplicationMetadataSummaryValidator 8 | { 9 | IEnumerable Validate(ApplicationMetadataSummary applicationMetadataSummary); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /DynamicMVC.ApplicationMetadataLibrary/Interfaces/IApplicationMetadataValidationManager.cs: -------------------------------------------------------------------------------- 1 | using DynamicMVC.ApplicationMetadataLibrary.Models; 2 | 3 | namespace DynamicMVC.ApplicationMetadataLibrary.Interfaces 4 | { 5 | public interface IApplicationMetadataValidationManager 6 | { 7 | void ValidateApplicationMetadataProvider(); 8 | void ValidateApplicationSummary(ApplicationMetadataSummary applicationMetadataSummary); 9 | } 10 | } -------------------------------------------------------------------------------- /DynamicMVC.ApplicationMetadataLibrary/Interfaces/IReflectedClassesBuilder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using ReflectionLibrary.Interfaces; 4 | 5 | namespace DynamicMVC.ApplicationMetadataLibrary.Interfaces 6 | { 7 | public interface IReflectedClassesBuilder 8 | { 9 | ICollection BuildApplicationEntityMetadataReflectedClasses(); 10 | ICollection BuildApplicationEntityReflectedClasses(IEnumerable types); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /DynamicMVC.ApplicationMetadataLibrary/Interfaces/ITypeManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using DynamicMVC.Shared.Interfaces; 3 | 4 | namespace DynamicMVC.ApplicationMetadataLibrary.Interfaces 5 | { 6 | public interface ITypeManager 7 | { 8 | bool IsSimple(Type type); 9 | bool IsCollection(Type type); 10 | Type CollectionType(Type type); 11 | bool IsNullableType(Type type); 12 | ISimpleTypeParser GetSimpleTypeParser(Type type); 13 | } 14 | } -------------------------------------------------------------------------------- /DynamicMVC.ApplicationMetadataLibrary/Models/ApplicationControllerMetadata.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace DynamicMVC.ApplicationMetadataLibrary.Models 4 | { 5 | /// 6 | /// Holds information about the controllers exactly as they exist in the application 7 | /// 8 | public class ApplicationControllerMetadata 9 | { 10 | public ApplicationControllerMetadata() 11 | { 12 | ApplicationControllerMethods = new HashSet(); 13 | } 14 | 15 | public ApplicationControllerMetadata(string name) : this() 16 | { 17 | Name = name; 18 | } 19 | 20 | public string Name { get; set; } 21 | public ICollection ApplicationControllerMethods { get; set; } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /DynamicMVC.ApplicationMetadataLibrary/Models/ApplicationEntityMetadataProperty.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace DynamicMVC.ApplicationMetadataLibrary.Models 5 | { 6 | /// 7 | /// Holds information about a property of a class being reflected for a given ApplicationEntityMetadata 8 | /// 9 | public class ApplicationEntityMetadataProperty 10 | { 11 | public ApplicationEntityMetadataProperty() 12 | { 13 | Attributes = new HashSet(); 14 | } 15 | 16 | public ApplicationEntityMetadataProperty(string propertyName) 17 | : this() 18 | { 19 | PropertyName = propertyName; 20 | } 21 | 22 | public string PropertyName { get; set; } 23 | 24 | public ICollection Attributes { get; set; } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /DynamicMVC.ApplicationMetadataLibrary/Strategies/SimpleTypeParsers/SimpleTypeBoolNullableParser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using DynamicMVC.ApplicationMetadataLibrary.Interfaces; 3 | using DynamicMVC.Shared.Enums; 4 | using DynamicMVC.Shared.Interfaces; 5 | using ReflectionLibrary.Enums; 6 | 7 | namespace DynamicMVC.ApplicationMetadataLibrary.Strategies.SimpleTypeParsers 8 | { 9 | /// 10 | /// Simple Type Parser for bool? datatype 11 | /// 12 | public class SimpleTypeBoolNullableParser : ISimpleTypeParser 13 | { 14 | public Type GetSimpleType() 15 | { 16 | return typeof(bool?); 17 | } 18 | 19 | public dynamic Parse(string value) 20 | { 21 | return (bool?)bool.Parse(value); 22 | } 23 | 24 | public SimpleTypeEnum SimpleTypeEnum() 25 | { 26 | return ReflectionLibrary.Enums.SimpleTypeEnum.BoolNullable; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /DynamicMVC.ApplicationMetadataLibrary/Strategies/SimpleTypeParsers/SimpleTypeBoolParser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using DynamicMVC.ApplicationMetadataLibrary.Interfaces; 3 | using DynamicMVC.Shared.Enums; 4 | using DynamicMVC.Shared.Interfaces; 5 | using ReflectionLibrary.Enums; 6 | 7 | namespace DynamicMVC.ApplicationMetadataLibrary.Strategies.SimpleTypeParsers 8 | { 9 | /// 10 | /// Simple Type Parser for bool datatype 11 | /// 12 | public class SimpleTypeBoolParser : ISimpleTypeParser 13 | { 14 | public Type GetSimpleType() 15 | { 16 | return typeof(bool); 17 | } 18 | 19 | public dynamic Parse(string value) 20 | { 21 | return bool.Parse(value); 22 | } 23 | 24 | public SimpleTypeEnum SimpleTypeEnum() 25 | { 26 | return ReflectionLibrary.Enums.SimpleTypeEnum.Bool; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /DynamicMVC.ApplicationMetadataLibrary/Strategies/SimpleTypeParsers/SimpleTypeByteNullableParser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using DynamicMVC.ApplicationMetadataLibrary.Interfaces; 3 | using DynamicMVC.Shared.Enums; 4 | using DynamicMVC.Shared.Interfaces; 5 | using ReflectionLibrary.Enums; 6 | 7 | namespace DynamicMVC.ApplicationMetadataLibrary.Strategies.SimpleTypeParsers 8 | { 9 | /// 10 | /// Simple Type Parser for Nullable Byte datatype 11 | /// 12 | public class SimpleTypeByteNullableParser : ISimpleTypeParser 13 | { 14 | public Type GetSimpleType() 15 | { 16 | return typeof(byte?); 17 | } 18 | 19 | public dynamic Parse(string value) 20 | { 21 | return (byte?)byte.Parse(value); 22 | } 23 | 24 | public SimpleTypeEnum SimpleTypeEnum() 25 | { 26 | return ReflectionLibrary.Enums.SimpleTypeEnum.ByteNullable; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /DynamicMVC.ApplicationMetadataLibrary/Strategies/SimpleTypeParsers/SimpleTypeByteParser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using DynamicMVC.ApplicationMetadataLibrary.Interfaces; 3 | using DynamicMVC.Shared.Enums; 4 | using DynamicMVC.Shared.Interfaces; 5 | using ReflectionLibrary.Enums; 6 | 7 | namespace DynamicMVC.ApplicationMetadataLibrary.Strategies.SimpleTypeParsers 8 | { 9 | /// 10 | /// Simple Type Parser for Byte datatype 11 | /// 12 | public class SimpleTypeByteParser : ISimpleTypeParser 13 | { 14 | public Type GetSimpleType() 15 | { 16 | return typeof(byte); 17 | } 18 | 19 | public dynamic Parse(string value) 20 | { 21 | return byte.Parse(value); 22 | } 23 | 24 | public SimpleTypeEnum SimpleTypeEnum() 25 | { 26 | return ReflectionLibrary.Enums.SimpleTypeEnum.Byte; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /DynamicMVC.ApplicationMetadataLibrary/Strategies/SimpleTypeParsers/SimpleTypeCharNullableParser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using DynamicMVC.ApplicationMetadataLibrary.Interfaces; 3 | using DynamicMVC.Shared.Enums; 4 | using DynamicMVC.Shared.Interfaces; 5 | using ReflectionLibrary.Enums; 6 | 7 | namespace DynamicMVC.ApplicationMetadataLibrary.Strategies.SimpleTypeParsers 8 | { 9 | /// 10 | /// Simple Type Parser for Char datatype 11 | /// 12 | public class SimpleTypeCharNullableParser : ISimpleTypeParser 13 | { 14 | public Type GetSimpleType() 15 | { 16 | return typeof(char?); 17 | } 18 | 19 | public dynamic Parse(string value) 20 | { 21 | return (char?)char.Parse(value); 22 | } 23 | 24 | public SimpleTypeEnum SimpleTypeEnum() 25 | { 26 | return ReflectionLibrary.Enums.SimpleTypeEnum.CharNullable; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /DynamicMVC.ApplicationMetadataLibrary/Strategies/SimpleTypeParsers/SimpleTypeCharParser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using DynamicMVC.ApplicationMetadataLibrary.Interfaces; 3 | using DynamicMVC.Shared.Enums; 4 | using DynamicMVC.Shared.Interfaces; 5 | using ReflectionLibrary.Enums; 6 | 7 | namespace DynamicMVC.ApplicationMetadataLibrary.Strategies.SimpleTypeParsers 8 | { 9 | /// 10 | /// Simple Type Parser for Nullable Char datatype 11 | /// 12 | public class SimpleTypeCharParser : ISimpleTypeParser 13 | { 14 | public Type GetSimpleType() 15 | { 16 | return typeof(char); 17 | } 18 | 19 | public dynamic Parse(string value) 20 | { 21 | return char.Parse(value); 22 | } 23 | 24 | public SimpleTypeEnum SimpleTypeEnum() 25 | { 26 | return ReflectionLibrary.Enums.SimpleTypeEnum.Char; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /DynamicMVC.ApplicationMetadataLibrary/Strategies/SimpleTypeParsers/SimpleTypeDateTimeParser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using DynamicMVC.ApplicationMetadataLibrary.Interfaces; 3 | using DynamicMVC.Shared.Enums; 4 | using DynamicMVC.Shared.Interfaces; 5 | using ReflectionLibrary.Enums; 6 | 7 | namespace DynamicMVC.ApplicationMetadataLibrary.Strategies.SimpleTypeParsers 8 | { 9 | /// 10 | /// Simple Type Parser for DateTime datatype 11 | /// 12 | public class SimpleTypeDateTimeParser : ISimpleTypeParser 13 | { 14 | public Type GetSimpleType() 15 | { 16 | return typeof(DateTime); 17 | } 18 | 19 | public dynamic Parse(string value) 20 | { 21 | return DateTime.Parse(value); 22 | } 23 | 24 | public SimpleTypeEnum SimpleTypeEnum() 25 | { 26 | return ReflectionLibrary.Enums.SimpleTypeEnum.DateTime; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /DynamicMVC.ApplicationMetadataLibrary/Strategies/SimpleTypeParsers/SimpleTypeDecimalParser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using DynamicMVC.ApplicationMetadataLibrary.Interfaces; 3 | using DynamicMVC.Shared.Enums; 4 | using DynamicMVC.Shared.Interfaces; 5 | using ReflectionLibrary.Enums; 6 | 7 | namespace DynamicMVC.ApplicationMetadataLibrary.Strategies.SimpleTypeParsers 8 | { 9 | /// 10 | /// Simple Type Parser for Decimal datatype 11 | /// 12 | public class SimpleTypeDecimalParser : ISimpleTypeParser 13 | { 14 | public Type GetSimpleType() 15 | { 16 | return typeof(decimal); 17 | } 18 | 19 | public dynamic Parse(string value) 20 | { 21 | return decimal.Parse(value); 22 | } 23 | 24 | public SimpleTypeEnum SimpleTypeEnum() 25 | { 26 | return ReflectionLibrary.Enums.SimpleTypeEnum.Decimal; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /DynamicMVC.ApplicationMetadataLibrary/Strategies/SimpleTypeParsers/SimpleTypeDoubleParser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using DynamicMVC.ApplicationMetadataLibrary.Interfaces; 3 | using DynamicMVC.Shared.Enums; 4 | using DynamicMVC.Shared.Interfaces; 5 | using ReflectionLibrary.Enums; 6 | 7 | namespace DynamicMVC.ApplicationMetadataLibrary.Strategies.SimpleTypeParsers 8 | { 9 | /// 10 | /// Simple Type Parser for Double datatype 11 | /// 12 | public class SimpleTypeDoubleParser : ISimpleTypeParser 13 | { 14 | public Type GetSimpleType() 15 | { 16 | return typeof(double); 17 | } 18 | 19 | public dynamic Parse(string value) 20 | { 21 | return double.Parse(value); 22 | } 23 | 24 | public SimpleTypeEnum SimpleTypeEnum() 25 | { 26 | return ReflectionLibrary.Enums.SimpleTypeEnum.Double; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /DynamicMVC.ApplicationMetadataLibrary/Strategies/SimpleTypeParsers/SimpleTypeFloatParser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using DynamicMVC.ApplicationMetadataLibrary.Interfaces; 3 | using DynamicMVC.Shared.Enums; 4 | using DynamicMVC.Shared.Interfaces; 5 | using ReflectionLibrary.Enums; 6 | 7 | namespace DynamicMVC.ApplicationMetadataLibrary.Strategies.SimpleTypeParsers 8 | { 9 | /// 10 | /// Simple Type Parser for Float datatype 11 | /// 12 | public class SimpleTypeFloatParser : ISimpleTypeParser 13 | { 14 | public Type GetSimpleType() 15 | { 16 | return typeof(float); 17 | } 18 | 19 | public dynamic Parse(string value) 20 | { 21 | return float.Parse(value); 22 | } 23 | 24 | public SimpleTypeEnum SimpleTypeEnum() 25 | { 26 | return ReflectionLibrary.Enums.SimpleTypeEnum.Float; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /DynamicMVC.ApplicationMetadataLibrary/Strategies/SimpleTypeParsers/SimpleTypeGuidNullableParser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using DynamicMVC.ApplicationMetadataLibrary.Interfaces; 3 | using DynamicMVC.Shared.Enums; 4 | using DynamicMVC.Shared.Interfaces; 5 | using ReflectionLibrary.Enums; 6 | 7 | namespace DynamicMVC.ApplicationMetadataLibrary.Strategies.SimpleTypeParsers 8 | { 9 | /// 10 | /// Simple Type Parser for Nullable Guid datatype 11 | /// 12 | public class SimpleTypeGuidNullableParser : ISimpleTypeParser 13 | { 14 | public Type GetSimpleType() 15 | { 16 | return typeof(Guid?); 17 | } 18 | 19 | public dynamic Parse(string value) 20 | { 21 | return (Guid?)Guid.Parse(value); 22 | } 23 | 24 | public SimpleTypeEnum SimpleTypeEnum() 25 | { 26 | return ReflectionLibrary.Enums.SimpleTypeEnum.GuidNullable; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /DynamicMVC.ApplicationMetadataLibrary/Strategies/SimpleTypeParsers/SimpleTypeGuidParser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using DynamicMVC.ApplicationMetadataLibrary.Interfaces; 3 | using DynamicMVC.Shared.Enums; 4 | using DynamicMVC.Shared.Interfaces; 5 | using ReflectionLibrary.Enums; 6 | 7 | namespace DynamicMVC.ApplicationMetadataLibrary.Strategies.SimpleTypeParsers 8 | { 9 | /// 10 | /// Simple Type Parser for Guid datatype 11 | /// 12 | public class SimpleTypeGuidParser : ISimpleTypeParser 13 | { 14 | public Type GetSimpleType() 15 | { 16 | return typeof(Guid); 17 | } 18 | 19 | public dynamic Parse(string value) 20 | { 21 | return Guid.Parse(value); 22 | } 23 | 24 | public SimpleTypeEnum SimpleTypeEnum() 25 | { 26 | return ReflectionLibrary.Enums.SimpleTypeEnum.Guid; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /DynamicMVC.ApplicationMetadataLibrary/Strategies/SimpleTypeParsers/SimpleTypeInt16Parser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using DynamicMVC.ApplicationMetadataLibrary.Interfaces; 3 | using DynamicMVC.Shared.Enums; 4 | using DynamicMVC.Shared.Interfaces; 5 | using ReflectionLibrary.Enums; 6 | 7 | namespace DynamicMVC.ApplicationMetadataLibrary.Strategies.SimpleTypeParsers 8 | { 9 | /// 10 | /// Simple Type Parser for Int16 datatype 11 | /// 12 | public class SimpleTypeInt16Parser : ISimpleTypeParser 13 | { 14 | public Type GetSimpleType() 15 | { 16 | return typeof(short); 17 | } 18 | 19 | public dynamic Parse(string value) 20 | { 21 | return short.Parse(value); 22 | } 23 | 24 | public SimpleTypeEnum SimpleTypeEnum() 25 | { 26 | return ReflectionLibrary.Enums.SimpleTypeEnum.Int16; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /DynamicMVC.ApplicationMetadataLibrary/Strategies/SimpleTypeParsers/SimpleTypeInt32NullableParser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using DynamicMVC.ApplicationMetadataLibrary.Interfaces; 3 | using DynamicMVC.Shared.Enums; 4 | using DynamicMVC.Shared.Interfaces; 5 | using ReflectionLibrary.Enums; 6 | 7 | namespace DynamicMVC.ApplicationMetadataLibrary.Strategies.SimpleTypeParsers 8 | { 9 | /// 10 | /// Simple Type Parser for Nullable Int32 datatype 11 | /// 12 | public class SimpleTypeInt32NullableParser : ISimpleTypeParser 13 | { 14 | public Type GetSimpleType() 15 | { 16 | return typeof(int?); 17 | } 18 | 19 | public dynamic Parse(string value) 20 | { 21 | return (int?)int.Parse(value); 22 | } 23 | 24 | public SimpleTypeEnum SimpleTypeEnum() 25 | { 26 | return ReflectionLibrary.Enums.SimpleTypeEnum.Int32Nullable; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /DynamicMVC.ApplicationMetadataLibrary/Strategies/SimpleTypeParsers/SimpleTypeInt32Parser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using DynamicMVC.ApplicationMetadataLibrary.Interfaces; 3 | using DynamicMVC.Shared.Enums; 4 | using DynamicMVC.Shared.Interfaces; 5 | using ReflectionLibrary.Enums; 6 | 7 | namespace DynamicMVC.ApplicationMetadataLibrary.Strategies.SimpleTypeParsers 8 | { 9 | /// 10 | /// Simple Type Parser for Int32 datatype 11 | /// 12 | public class SimpleTypeInt32Parser : ISimpleTypeParser 13 | { 14 | public Type GetSimpleType() 15 | { 16 | return typeof(int); 17 | } 18 | 19 | public dynamic Parse(string value) 20 | { 21 | return int.Parse(value); 22 | } 23 | 24 | public SimpleTypeEnum SimpleTypeEnum() 25 | { 26 | return ReflectionLibrary.Enums.SimpleTypeEnum.Int32; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /DynamicMVC.ApplicationMetadataLibrary/Strategies/SimpleTypeParsers/SimpleTypeInt64Parser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using DynamicMVC.ApplicationMetadataLibrary.Interfaces; 3 | using DynamicMVC.Shared.Enums; 4 | using DynamicMVC.Shared.Interfaces; 5 | using ReflectionLibrary.Enums; 6 | 7 | namespace DynamicMVC.ApplicationMetadataLibrary.Strategies.SimpleTypeParsers 8 | { 9 | /// 10 | /// Simple Type Parser for Int64 datatype 11 | /// 12 | public class SimpleTypeInt64Parser : ISimpleTypeParser 13 | { 14 | public Type GetSimpleType() 15 | { 16 | return typeof(long); 17 | } 18 | 19 | public dynamic Parse(string value) 20 | { 21 | return long.Parse(value); 22 | } 23 | 24 | public SimpleTypeEnum SimpleTypeEnum() 25 | { 26 | return ReflectionLibrary.Enums.SimpleTypeEnum.Int64; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /DynamicMVC.ApplicationMetadataLibrary/Strategies/SimpleTypeParsers/SimpleTypeSByteParser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using DynamicMVC.ApplicationMetadataLibrary.Interfaces; 3 | using DynamicMVC.Shared.Enums; 4 | using DynamicMVC.Shared.Interfaces; 5 | using ReflectionLibrary.Enums; 6 | 7 | namespace DynamicMVC.ApplicationMetadataLibrary.Strategies.SimpleTypeParsers 8 | { 9 | /// 10 | /// Simple Type Parser for SByte datatype 11 | /// 12 | public class SimpleTypeSByteParser : ISimpleTypeParser 13 | { 14 | public Type GetSimpleType() 15 | { 16 | return typeof(sbyte); 17 | } 18 | 19 | public dynamic Parse(string value) 20 | { 21 | return sbyte.Parse(value); 22 | } 23 | 24 | public SimpleTypeEnum SimpleTypeEnum() 25 | { 26 | return ReflectionLibrary.Enums.SimpleTypeEnum.SByte; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /DynamicMVC.ApplicationMetadataLibrary/Strategies/SimpleTypeParsers/SimpleTypeStringParser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using DynamicMVC.ApplicationMetadataLibrary.Interfaces; 3 | using DynamicMVC.Shared.Enums; 4 | using DynamicMVC.Shared.Interfaces; 5 | using ReflectionLibrary.Enums; 6 | 7 | namespace DynamicMVC.ApplicationMetadataLibrary.Strategies.SimpleTypeParsers 8 | { 9 | /// 10 | /// Simple Type Parser for String datatype 11 | /// 12 | public class SimpleTypeStringParser : ISimpleTypeParser 13 | { 14 | public Type GetSimpleType() 15 | { 16 | return typeof(string); 17 | } 18 | 19 | public dynamic Parse(string value) 20 | { 21 | return value; 22 | } 23 | 24 | public SimpleTypeEnum SimpleTypeEnum() 25 | { 26 | return ReflectionLibrary.Enums.SimpleTypeEnum.String; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /DynamicMVC.ApplicationMetadataLibrary/Strategies/SimpleTypeParsers/SimpleTypeUInt16Parser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using DynamicMVC.ApplicationMetadataLibrary.Interfaces; 3 | using DynamicMVC.Shared.Enums; 4 | using DynamicMVC.Shared.Interfaces; 5 | using ReflectionLibrary.Enums; 6 | 7 | namespace DynamicMVC.ApplicationMetadataLibrary.Strategies.SimpleTypeParsers 8 | { 9 | /// 10 | /// Simple Type Parser for UInt16 datatype 11 | /// 12 | public class SimpleTypeUInt16Parser : ISimpleTypeParser 13 | { 14 | public Type GetSimpleType() 15 | { 16 | return typeof(ushort); 17 | } 18 | 19 | public dynamic Parse(string value) 20 | { 21 | return ushort.Parse(value); 22 | } 23 | 24 | public SimpleTypeEnum SimpleTypeEnum() 25 | { 26 | return ReflectionLibrary.Enums.SimpleTypeEnum.UInt16; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /DynamicMVC.ApplicationMetadataLibrary/Strategies/SimpleTypeParsers/SimpleTypeUInt32Parser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using DynamicMVC.ApplicationMetadataLibrary.Interfaces; 3 | using DynamicMVC.Shared.Enums; 4 | using DynamicMVC.Shared.Interfaces; 5 | using ReflectionLibrary.Enums; 6 | 7 | namespace DynamicMVC.ApplicationMetadataLibrary.Strategies.SimpleTypeParsers 8 | { 9 | /// 10 | /// Simple Type Parser for UInt32 datatype 11 | /// 12 | public class SimpleTypeUInt32Parser : ISimpleTypeParser 13 | { 14 | public Type GetSimpleType() 15 | { 16 | return typeof(uint); 17 | } 18 | 19 | public dynamic Parse(string value) 20 | { 21 | return uint.Parse(value); 22 | } 23 | 24 | public SimpleTypeEnum SimpleTypeEnum() 25 | { 26 | return ReflectionLibrary.Enums.SimpleTypeEnum.UInt32; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /DynamicMVC.ApplicationMetadataLibrary/Strategies/SimpleTypeParsers/SimpleTypeUInt64Parser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using DynamicMVC.ApplicationMetadataLibrary.Interfaces; 3 | using DynamicMVC.Shared.Enums; 4 | using DynamicMVC.Shared.Interfaces; 5 | using ReflectionLibrary.Enums; 6 | 7 | namespace DynamicMVC.ApplicationMetadataLibrary.Strategies.SimpleTypeParsers 8 | { 9 | /// 10 | /// Simple Type Parser for UInt64 datatype 11 | /// 12 | public class SimpleTypeUInt64Parser : ISimpleTypeParser 13 | { 14 | public Type GetSimpleType() 15 | { 16 | return typeof(ulong); 17 | } 18 | 19 | public dynamic Parse(string value) 20 | { 21 | return ulong.Parse(value); 22 | } 23 | 24 | public SimpleTypeEnum SimpleTypeEnum() 25 | { 26 | return ReflectionLibrary.Enums.SimpleTypeEnum.UInt64; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /DynamicMVC.ApplicationMetadataLibrary/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /DynamicMVC.ApplicationMetadataLibraryTest/UnitTestHelpers/ClassesForParsing.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using DynamicMVC.Annotations; 8 | 9 | namespace DynamicMVCTest.UnitTestHelpers 10 | { 11 | public class Hello 12 | { 13 | 14 | } 15 | 16 | [DynamicEntity] 17 | public class World 18 | { 19 | [Required] 20 | public object Name { get; set; } 21 | public int Age { get; set; } 22 | 23 | [Required] 24 | public ICollection Hellos { get; set; } 25 | 26 | [Required] 27 | public ICollection Worlds { get; set; } 28 | } 29 | 30 | [DynamicEntity] 31 | public class World2 32 | { 33 | 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /DynamicMVC.ApplicationMetadataLibraryTest/UnitTests/Strategies/SimpleTypeParsers/SimpleTypeNullableParserTest.cs: -------------------------------------------------------------------------------- 1 | using DynamicMVC.ApplicationMetadataLibrary.Strategies.SimpleTypeParsers; 2 | using Microsoft.VisualStudio.TestTools.UnitTesting; 3 | 4 | namespace DynamicMVC.ApplicationMetadataLibraryTest.UnitTests.Strategies 5 | { 6 | [TestClass] 7 | public class UnitTest1 8 | { 9 | [TestMethod] 10 | public void TestMethod1() 11 | { 12 | var stp = new SimpleTypeBoolNullableParser(); 13 | var result = stp.Parse("false"); 14 | Assert.IsTrue(result is bool?); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /DynamicMVC.ApplicationMetadataLibraryTest/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /DynamicMVC.Data/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /DynamicMVC.Data/CreateDbContextManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Data.Entity; 3 | using DynamicMVC.Data.Interfaces; 4 | 5 | namespace DynamicMVC.Data 6 | { 7 | public class CreateDbContextManager : ICreateDbContextManager 8 | { 9 | public CreateDbContextManager(Func createDbContextFunction) 10 | { 11 | CreateDbContextFunction = createDbContextFunction; 12 | } 13 | 14 | public Func CreateDbContextFunction { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /DynamicMVC.Data/Interfaces/ICreateDbContextManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Data.Entity; 3 | 4 | namespace DynamicMVC.Data.Interfaces 5 | { 6 | public interface ICreateDbContextManager 7 | { 8 | Func CreateDbContextFunction { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /DynamicMVC.Data/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /DynamicMVC.DynamicEntityMetadataLibrary/Interfaces/IDynamicEntityMetadataBuilder.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using DynamicMVC.DynamicEntityMetadataLibrary.Models; 3 | using ReflectionLibrary.Interfaces; 4 | 5 | namespace DynamicMVC.DynamicEntityMetadataLibrary.Interfaces 6 | { 7 | public interface IDynamicEntityMetadataBuilder 8 | { 9 | IEnumerable Build(IEnumerable reflectedClasses); 10 | } 11 | } -------------------------------------------------------------------------------- /DynamicMVC.DynamicEntityMetadataLibrary/Interfaces/IDynamicEntityMetadataManager.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using ReflectionLibrary.Interfaces; 3 | #pragma warning disable 1591 4 | 5 | namespace DynamicMVC.DynamicEntityMetadataLibrary.Interfaces 6 | { 7 | public interface IDynamicEntityMetadataManager 8 | { 9 | IEnumerable GetDynamicEntityMetadatas(); 10 | IEnumerable GetDynamicEntityMetadatas(IEnumerable reflectedClasses); 11 | } 12 | } -------------------------------------------------------------------------------- /DynamicMVC.DynamicEntityMetadataLibrary/Interfaces/IDynamicEntityMetadataPropertyFixup.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using DynamicMVC.DynamicEntityMetadataLibrary.Models; 3 | 4 | namespace DynamicMVC.DynamicEntityMetadataLibrary.Interfaces 5 | { 6 | public interface IDynamicEntityMetadataPropertyFixup 7 | { 8 | void Fixup(IEnumerable dynamicEntityMetadatas); 9 | int Order(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /DynamicMVC.DynamicEntityMetadataLibrary/Interfaces/IDynamicEntityMetadataValidator.cs: -------------------------------------------------------------------------------- 1 | using DynamicMVC.DynamicEntityMetadataLibrary.Models; 2 | 3 | namespace DynamicMVC.DynamicEntityMetadataLibrary.Interfaces 4 | { 5 | public interface IDynamicEntityMetadataValidator 6 | { 7 | string Validate(DynamicEntityMetadata dynamicEntityMetadata); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /DynamicMVC.DynamicEntityMetadataLibrary/Interfaces/IDynamicMethodManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using DynamicMVC.Annotations.Enums; 7 | using DynamicMVC.DynamicEntityMetadataLibrary.Models; 8 | using ReflectionLibrary.Interfaces; 9 | 10 | namespace DynamicMVC.DynamicEntityMetadataLibrary.Interfaces 11 | { 12 | public interface IDynamicMethodManager 13 | { 14 | IEnumerable GetDynamicMethods(IReflectedClass reflectedClass); 15 | IEnumerable GetDynamicMethods(TemplateTypeEnum templateTypeEnum, IEnumerable dynamicMethods); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /DynamicMVC.DynamicEntityMetadataLibrary/Interfaces/IDynamicOperationManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using DynamicMVC.Annotations.Enums; 7 | using DynamicMVC.DynamicEntityMetadataLibrary.Models; 8 | 9 | namespace DynamicMVC.DynamicEntityMetadataLibrary.Interfaces 10 | { 11 | public interface IDynamicOperationManager 12 | { 13 | DynamicOperation GetDynamicOperation(TemplateTypeEnum templateTypeEnum, string submitValue, IEnumerable dynamicMethods); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /DynamicMVC.DynamicEntityMetadataLibrary/Interfaces/IDynamicPropertyMetadataBuilder.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using DynamicMVC.DynamicEntityMetadataLibrary.Models; 3 | using ReflectionLibrary.Interfaces; 4 | 5 | namespace DynamicMVC.DynamicEntityMetadataLibrary.Interfaces 6 | { 7 | public interface IDynamicPropertyMetadataBuilder 8 | { 9 | IEnumerable Build(IReflectedClass reflectedClass, IEnumerable reflectedClasses); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /DynamicMVC.DynamicEntityMetadataLibrary/Interfaces/INavigationPropertyManager.cs: -------------------------------------------------------------------------------- 1 | using DynamicMVC.DynamicEntityMetadataLibrary.Models; 2 | using ReflectionLibrary.Interfaces; 3 | 4 | namespace DynamicMVC.DynamicEntityMetadataLibrary.Interfaces 5 | { 6 | public interface INavigationPropertyManager 7 | { 8 | DynamicForiegnKeyPropertyMetadata GetDynamicForiegnKeyPropertyMetadata(DynamicEntityMetadata dynamicEntityMetadata, DynamicComplexPropertyMetadata dynamicComplexPropertyMetadata); 9 | DynamicPropertyMetadata GetCollectionProperty(DynamicEntityMetadata dynamicEntityMetadata, DynamicPropertyMetadata dynamicPropertyMetadata); 10 | string GetForiegnKeyNameByCollectionProperty(DynamicEntityMetadata entityMetadata, string typeName, DynamicCollectionEntityPropertyMetadata dynamicCollectionEntityPropertyMetadata); 11 | bool IsForeignKey(IReflectedProperty reflectedProperty, IReflectedClass reflectedClass); 12 | } 13 | } -------------------------------------------------------------------------------- /DynamicMVC.DynamicEntityMetadataLibrary/Interfaces/IReflectedDynamicClass.cs: -------------------------------------------------------------------------------- 1 | using ReflectionLibrary.Interfaces; 2 | 3 | namespace DynamicMVC.DynamicEntityMetadataLibrary.Interfaces 4 | { 5 | /// 6 | /// Reflected class for Dynamic MVC 7 | /// 8 | public interface IReflectedDynamicClass : IReflectedClass 9 | { 10 | /// 11 | /// Controller reflected class 12 | /// 13 | IReflectedClass ControllerReflectedClass { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /DynamicMVC.DynamicEntityMetadataLibrary/Interfaces/IReflectionManager.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace DynamicMVC.DynamicEntityMetadataLibrary.Interfaces 4 | { 5 | public interface IReflectionManager 6 | { 7 | IEnumerable GetReflectedDynamicClasses(); 8 | } 9 | } -------------------------------------------------------------------------------- /DynamicMVC.DynamicEntityMetadataLibrary/Models/DynamicComplexPropertyMetadata.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using ReflectionLibrary.Interfaces; 3 | 4 | namespace DynamicMVC.DynamicEntityMetadataLibrary.Models 5 | { 6 | public class DynamicComplexPropertyMetadata : DynamicPropertyMetadata 7 | { 8 | public DynamicComplexPropertyMetadata(IReflectedProperty reflectedProperty, IEnumerable reflectedClasses) 9 | :base(reflectedProperty, reflectedClasses) 10 | { 11 | 12 | } 13 | 14 | public DynamicForiegnKeyPropertyMetadata DynamicForiegnKeyPropertyMetadata { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /DynamicMVC.DynamicEntityMetadataLibrary/Models/DynamicForiegnKeyPropertyMetadata.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using ReflectionLibrary.Interfaces; 3 | 4 | namespace DynamicMVC.DynamicEntityMetadataLibrary.Models 5 | { 6 | /// 7 | /// 8 | /// 9 | public class DynamicForiegnKeyPropertyMetadata : DynamicPropertyMetadata 10 | { 11 | public DynamicForiegnKeyPropertyMetadata(IReflectedProperty reflectedProperty, IEnumerable reflectedClasses) 12 | : base(reflectedProperty, reflectedClasses) 13 | { 14 | 15 | } 16 | 17 | public DynamicPropertyMetadata ComplexEntityPropertyMetadata { get; set; } 18 | public DynamicEntityMetadata ComplexDynamicEntityMetadata { get; set; } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /DynamicMVC.DynamicEntityMetadataLibrary/Models/DynamicMenuInfo.cs: -------------------------------------------------------------------------------- 1 | namespace DynamicMVC.DynamicEntityMetadataLibrary.Models 2 | { 3 | public class DynamicMenuInfo 4 | { 5 | public bool HasMenuItem { get; set; } 6 | public string MenuItemCategory { get; set; } 7 | public string MenuItemDisplayName { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /DynamicMVC.DynamicEntityMetadataLibrary/Models/ReflectedDynamicClass.cs: -------------------------------------------------------------------------------- 1 | using DynamicMVC.DynamicEntityMetadataLibrary.Interfaces; 2 | using ReflectionLibrary.Interfaces; 3 | using ReflectionLibrary.Models; 4 | #pragma warning disable 1591 5 | 6 | namespace DynamicMVC.DynamicEntityMetadataLibrary.Models 7 | { 8 | public class ReflectedDynamicClass : ReflectedClass, IReflectedDynamicClass 9 | { 10 | public ReflectedDynamicClass(IAttributeMergeManager attributeMergeManager) : base(attributeMergeManager) 11 | { 12 | } 13 | 14 | public IReflectedClass ControllerReflectedClass { get; set; } 15 | 16 | 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /DynamicMVC.DynamicEntityMetadataLibrary/Strategies/DynamicEntityMetadataValidators/CRUDPropertiesValidator.cs: -------------------------------------------------------------------------------- 1 | using DynamicMVC.DynamicEntityMetadataLibrary.Interfaces; 2 | using DynamicMVC.DynamicEntityMetadataLibrary.Models; 3 | 4 | namespace DynamicMVC.DynamicEntityMetadataLibrary.Strategies.DynamicEntityMetadataValidators 5 | { 6 | public class CRUDPropertiesValidator : IDynamicEntityMetadataValidator 7 | { 8 | public string Validate(DynamicEntityMetadata dynamicEntityMetadata) 9 | { 10 | if (dynamicEntityMetadata.ScaffoldIndexProperties() == null) 11 | return "ScaffoldIndexProperties should not be null for DynamicEntity " + dynamicEntityMetadata.TypeName(); 12 | 13 | return null; 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /DynamicMVC.DynamicEntityMetadataLibrary/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /DynamicMVC.EntityMetadataLibrary/Interfaces/IEntityMetadataBuilder.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using DynamicMVC.ApplicationMetadataLibrary.Models; 3 | using DynamicMVC.EntityMetadataLibrary.Models; 4 | 5 | namespace DynamicMVC.EntityMetadataLibrary.Interfaces 6 | { 7 | public interface IEntityMetadataBuilder 8 | { 9 | IEnumerable Build(ApplicationMetadataSummary applicationMetadataSummary); 10 | } 11 | } -------------------------------------------------------------------------------- /DynamicMVC.EntityMetadataLibrary/Interfaces/IEntityMetadataManager.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using DynamicMVC.EntityMetadataLibrary.Models; 3 | 4 | namespace DynamicMVC.EntityMetadataLibrary.Interfaces 5 | { 6 | public interface IEntityMetadataManager 7 | { 8 | IEnumerable GetEntityMetadatas(); 9 | } 10 | } -------------------------------------------------------------------------------- /DynamicMVC.EntityMetadataLibrary/Interfaces/IEntityPropertyMetadataBuilder.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using DynamicMVC.ApplicationMetadataLibrary.Models; 3 | using DynamicMVC.EntityMetadataLibrary.Models; 4 | 5 | namespace DynamicMVC.EntityMetadataLibrary.Interfaces 6 | { 7 | public interface IEntityPropertyMetadataBuilder 8 | { 9 | IEnumerable Build(ApplicationEntity applicationEntity); 10 | } 11 | } -------------------------------------------------------------------------------- /DynamicMVC.EntityMetadataLibrary/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /DynamicMVC.EntityMetadataLibraryTest/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /DynamicMVC.Shared/Enums/MessageTypeEnum.cs: -------------------------------------------------------------------------------- 1 | namespace DynamicMVC.Shared.Enums 2 | { 3 | public enum MessageTypeEnum 4 | { 5 | Success, 6 | Info, 7 | Warning, 8 | Danger 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /DynamicMVC.Shared/Extensions/ICollectionExtensions.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace DynamicMVC.Shared.Extensions 4 | { 5 | public static class CollectionExtensions 6 | { 7 | public static void AddRange(this ICollection collection, IEnumerable items) 8 | { 9 | foreach (var item in items) 10 | { 11 | collection.Add(item); 12 | } 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /DynamicMVC.Shared/Extensions/StringExtensions.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace DynamicMVC.Shared.Extensions 4 | { 5 | public static class StringExtensions 6 | { 7 | public static IEnumerable SplitAndTrim(this string str) 8 | { 9 | return str.Replace(" ","").Split(','); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /DynamicMVC.Shared/Interfaces/IApplicationMetadataProvider.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace DynamicMVC.Shared.Interfaces 5 | { 6 | public interface IApplicationMetadataProvider 7 | { 8 | IEnumerable MvcAssemblyTypes { get; set; } 9 | IEnumerable MetadataAssemblyTypes { get; set; } 10 | IEnumerable EntityAssemblyTypes { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /DynamicMVC.Shared/Interfaces/IApplicationReflectionProvider.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using ReflectionLibrary.Interfaces; 3 | 4 | namespace DynamicMVC.Shared.Interfaces 5 | { 6 | public interface IApplicationReflectionProvider 7 | { 8 | IEnumerable ReflectedDynamicEntities { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /DynamicMVC.Shared/Interfaces/INamingConventionManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace DynamicMVC.Shared.Interfaces 5 | { 6 | public interface INamingConventionManager 7 | { 8 | string GetForiegnKeyByComplexProperty(string typeName, string complexPropertyName); 9 | bool IsController(Type type); 10 | string FindControllerName(IEnumerable controllerNames, string typeName); 11 | string DynamicMenuCategory(); 12 | string FindDefaultPropertyName(string typeName, IEnumerable propertyNames); 13 | } 14 | } -------------------------------------------------------------------------------- /DynamicMVC.Shared/Interfaces/IPropertyFilterManager.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace DynamicMVC.Shared.Interfaces 4 | { 5 | public interface IPropertyFilterManager 6 | { 7 | IEnumerable FilterAndOrderProperties(IEnumerable properties, string propertyList) where T : IPropertyWithPropertyName; 8 | } 9 | } -------------------------------------------------------------------------------- /DynamicMVC.Shared/Interfaces/IPropertyWithPropertyName.cs: -------------------------------------------------------------------------------- 1 | namespace DynamicMVC.Shared.Interfaces 2 | { 3 | public interface IPropertyWithPropertyName 4 | { 5 | string PropertyName(); 6 | } 7 | } -------------------------------------------------------------------------------- /DynamicMVC.Shared/Interfaces/IValidationManager.cs: -------------------------------------------------------------------------------- 1 | namespace DynamicMVC.Shared.Interfaces 2 | { 3 | public interface IValidationManager 4 | { 5 | void ValidateObject(object item); 6 | } 7 | } -------------------------------------------------------------------------------- /DynamicMVC.Shared/Managers/ValidationManager.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using System.Linq; 3 | using DynamicMVC.Shared.Extensions; 4 | using DynamicMVC.Shared.Interfaces; 5 | 6 | namespace DynamicMVC.Shared.Managers 7 | { 8 | public class ValidationManager : IValidationManager 9 | { 10 | public void ValidateObject(object item) 11 | { 12 | if (item.GetType().ImplementsInterface()) 13 | { 14 | var validationResults = ((IValidatableObject) item).Validate(null).ToList(); 15 | if (validationResults.Any()) 16 | { 17 | var validationResult = validationResults.First(); 18 | throw new ValidationException(validationResult.ErrorMessage); 19 | } 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /DynamicMVC.Shared/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /DynamicMVC.UI/App_Data/aspnet-DynamicMVC.UI-20140716102202.mdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrecisionWebTechnologies/DynamicMVC/a7aac78639c76281e1b1ce00b79ba8f0ee16bdc7/DynamicMVC.UI/App_Data/aspnet-DynamicMVC.UI-20140716102202.mdf -------------------------------------------------------------------------------- /DynamicMVC.UI/App_Data/aspnet-DynamicMVC.UI-20140716102202_log.ldf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrecisionWebTechnologies/DynamicMVC/a7aac78639c76281e1b1ce00b79ba8f0ee16bdc7/DynamicMVC.UI/App_Data/aspnet-DynamicMVC.UI-20140716102202_log.ldf -------------------------------------------------------------------------------- /DynamicMVC.UI/App_Start/FilterConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | using System.Web.Mvc; 3 | 4 | namespace DynamicMVC.UI 5 | { 6 | public class FilterConfig 7 | { 8 | public static void RegisterGlobalFilters(GlobalFilterCollection filters) 9 | { 10 | filters.Add(new HandleErrorAttribute()); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /DynamicMVC.UI/App_Start/RouteConfig.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | using System.Web.Routing; 7 | 8 | namespace DynamicMVC.UI 9 | { 10 | public class RouteConfig 11 | { 12 | public static void RegisterRoutes(RouteCollection routes) 13 | { 14 | routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); 15 | 16 | routes.MapRoute( 17 | name: "Default", 18 | url: "{controller}/{action}/{id}", 19 | defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } 20 | ); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Content/DynamicStyle.css: -------------------------------------------------------------------------------- 1 | /*Custom css for filter panel on mobile index view*/ 2 | .panel-info > .panel-footer { 3 | color: white; 4 | background-color: #428bca; 5 | border-color: #bce8f1; 6 | } 7 | 8 | .clickable { 9 | cursor: pointer; 10 | } 11 | 12 | .panel-heading span { 13 | margin-top: -20px; 14 | font-size: 15px; 15 | } 16 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Content/Site.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 50px; 3 | padding-bottom: 20px; 4 | } 5 | 6 | /* Set padding to keep content from hitting the edges */ 7 | .body-content { 8 | padding-left: 15px; 9 | padding-right: 15px; 10 | } 11 | 12 | /* Set width on the form input elements since they're 100% wide by default */ 13 | input, 14 | select, 15 | textarea { 16 | max-width: 280px; 17 | } 18 | 19 | 20 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Content/Validation.css: -------------------------------------------------------------------------------- 1 | /* styles for validation helpers */ 2 | .field-validation-error { 3 | color: #b94a48; 4 | } 5 | 6 | .field-validation-valid { 7 | display: none; 8 | } 9 | 10 | input.input-validation-error { 11 | border: 1px solid #b94a48; 12 | } 13 | 14 | input[type="checkbox"].input-validation-error { 15 | border: 0 none; 16 | } 17 | 18 | .validation-summary-errors { 19 | color: #b94a48; 20 | } 21 | 22 | .validation-summary-valid { 23 | display: none; 24 | } 25 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Content/css/select2-spinner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrecisionWebTechnologies/DynamicMVC/a7aac78639c76281e1b1ce00b79ba8f0ee16bdc7/DynamicMVC.UI/Content/css/select2-spinner.gif -------------------------------------------------------------------------------- /DynamicMVC.UI/Content/css/select2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrecisionWebTechnologies/DynamicMVC/a7aac78639c76281e1b1ce00b79ba8f0ee16bdc7/DynamicMVC.UI/Content/css/select2.png -------------------------------------------------------------------------------- /DynamicMVC.UI/Content/css/select2x2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrecisionWebTechnologies/DynamicMVC/a7aac78639c76281e1b1ce00b79ba8f0ee16bdc7/DynamicMVC.UI/Content/css/select2x2.png -------------------------------------------------------------------------------- /DynamicMVC.UI/Content/themes/base/all.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI CSS Framework 1.11.1 3 | * http://jqueryui.com 4 | * 5 | * Copyright 2014 jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/category/theming/ 10 | */ 11 | @import "base.css"; 12 | @import "theme.css"; 13 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Content/themes/base/autocomplete.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Autocomplete 1.11.1 3 | * http://jqueryui.com 4 | * 5 | * Copyright 2014 jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/autocomplete/#theming 10 | */ 11 | .ui-autocomplete { 12 | position: absolute; 13 | top: 0; 14 | left: 0; 15 | cursor: default; 16 | } 17 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Content/themes/base/base.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI CSS Framework 1.11.1 3 | * http://jqueryui.com 4 | * 5 | * Copyright 2014 jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/category/theming/ 10 | */ 11 | @import url("core.css"); 12 | 13 | @import url("accordion.css"); 14 | @import url("autocomplete.css"); 15 | @import url("button.css"); 16 | @import url("datepicker.css"); 17 | @import url("dialog.css"); 18 | @import url("draggable.css"); 19 | @import url("menu.css"); 20 | @import url("progressbar.css"); 21 | @import url("resizable.css"); 22 | @import url("selectable.css"); 23 | @import url("selectmenu.css"); 24 | @import url("sortable.css"); 25 | @import url("slider.css"); 26 | @import url("spinner.css"); 27 | @import url("tabs.css"); 28 | @import url("tooltip.css"); 29 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Content/themes/base/draggable.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Draggable 1.11.1 3 | * http://jqueryui.com 4 | * 5 | * Copyright 2014 jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | */ 9 | .ui-draggable-handle { 10 | -ms-touch-action: none; 11 | touch-action: none; 12 | } 13 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Content/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrecisionWebTechnologies/DynamicMVC/a7aac78639c76281e1b1ce00b79ba8f0ee16bdc7/DynamicMVC.UI/Content/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png -------------------------------------------------------------------------------- /DynamicMVC.UI/Content/themes/base/images/ui-bg_flat_75_ffffff_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrecisionWebTechnologies/DynamicMVC/a7aac78639c76281e1b1ce00b79ba8f0ee16bdc7/DynamicMVC.UI/Content/themes/base/images/ui-bg_flat_75_ffffff_40x100.png -------------------------------------------------------------------------------- /DynamicMVC.UI/Content/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrecisionWebTechnologies/DynamicMVC/a7aac78639c76281e1b1ce00b79ba8f0ee16bdc7/DynamicMVC.UI/Content/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png -------------------------------------------------------------------------------- /DynamicMVC.UI/Content/themes/base/images/ui-bg_glass_65_ffffff_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrecisionWebTechnologies/DynamicMVC/a7aac78639c76281e1b1ce00b79ba8f0ee16bdc7/DynamicMVC.UI/Content/themes/base/images/ui-bg_glass_65_ffffff_1x400.png -------------------------------------------------------------------------------- /DynamicMVC.UI/Content/themes/base/images/ui-bg_glass_75_dadada_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrecisionWebTechnologies/DynamicMVC/a7aac78639c76281e1b1ce00b79ba8f0ee16bdc7/DynamicMVC.UI/Content/themes/base/images/ui-bg_glass_75_dadada_1x400.png -------------------------------------------------------------------------------- /DynamicMVC.UI/Content/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrecisionWebTechnologies/DynamicMVC/a7aac78639c76281e1b1ce00b79ba8f0ee16bdc7/DynamicMVC.UI/Content/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png -------------------------------------------------------------------------------- /DynamicMVC.UI/Content/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrecisionWebTechnologies/DynamicMVC/a7aac78639c76281e1b1ce00b79ba8f0ee16bdc7/DynamicMVC.UI/Content/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png -------------------------------------------------------------------------------- /DynamicMVC.UI/Content/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrecisionWebTechnologies/DynamicMVC/a7aac78639c76281e1b1ce00b79ba8f0ee16bdc7/DynamicMVC.UI/Content/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png -------------------------------------------------------------------------------- /DynamicMVC.UI/Content/themes/base/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrecisionWebTechnologies/DynamicMVC/a7aac78639c76281e1b1ce00b79ba8f0ee16bdc7/DynamicMVC.UI/Content/themes/base/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /DynamicMVC.UI/Content/themes/base/images/ui-icons_2e83ff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrecisionWebTechnologies/DynamicMVC/a7aac78639c76281e1b1ce00b79ba8f0ee16bdc7/DynamicMVC.UI/Content/themes/base/images/ui-icons_2e83ff_256x240.png -------------------------------------------------------------------------------- /DynamicMVC.UI/Content/themes/base/images/ui-icons_454545_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrecisionWebTechnologies/DynamicMVC/a7aac78639c76281e1b1ce00b79ba8f0ee16bdc7/DynamicMVC.UI/Content/themes/base/images/ui-icons_454545_256x240.png -------------------------------------------------------------------------------- /DynamicMVC.UI/Content/themes/base/images/ui-icons_888888_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrecisionWebTechnologies/DynamicMVC/a7aac78639c76281e1b1ce00b79ba8f0ee16bdc7/DynamicMVC.UI/Content/themes/base/images/ui-icons_888888_256x240.png -------------------------------------------------------------------------------- /DynamicMVC.UI/Content/themes/base/images/ui-icons_cd0a0a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrecisionWebTechnologies/DynamicMVC/a7aac78639c76281e1b1ce00b79ba8f0ee16bdc7/DynamicMVC.UI/Content/themes/base/images/ui-icons_cd0a0a_256x240.png -------------------------------------------------------------------------------- /DynamicMVC.UI/Content/themes/base/selectable.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Selectable 1.11.1 3 | * http://jqueryui.com 4 | * 5 | * Copyright 2014 jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | */ 9 | .ui-selectable { 10 | -ms-touch-action: none; 11 | touch-action: none; 12 | } 13 | .ui-selectable-helper { 14 | position: absolute; 15 | z-index: 100; 16 | border: 1px dotted black; 17 | } 18 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Content/themes/base/sortable.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Sortable 1.11.1 3 | * http://jqueryui.com 4 | * 5 | * Copyright 2014 jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | */ 9 | .ui-sortable-handle { 10 | -ms-touch-action: none; 11 | touch-action: none; 12 | } 13 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Content/themes/base/tooltip.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Tooltip 1.11.1 3 | * http://jqueryui.com 4 | * 5 | * Copyright 2014 jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/tooltip/#theming 10 | */ 11 | .ui-tooltip { 12 | padding: 8px; 13 | position: absolute; 14 | z-index: 9999; 15 | max-width: 300px; 16 | -webkit-box-shadow: 0 0 5px #aaa; 17 | box-shadow: 0 0 5px #aaa; 18 | } 19 | body .ui-tooltip { 20 | border-width: 2px; 21 | } 22 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | 7 | namespace DynamicMVC.UI.Controllers 8 | { 9 | public class HomeController : Controller 10 | { 11 | public ActionResult Index() 12 | { 13 | return View(); 14 | } 15 | 16 | public ActionResult About() 17 | { 18 | ViewBag.Message = "Your application description page."; 19 | 20 | return View(); 21 | } 22 | 23 | public ActionResult Contact() 24 | { 25 | ViewBag.Message = "Your contact page."; 26 | 27 | return View(); 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /DynamicMVC.UI/DynamicMVC/CorrectQueryStringTypesActionFilter.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Mvc; 2 | using DynamicMVC.UI.Controllers; 3 | 4 | namespace DynamicMVC.UI.DynamicMVC 5 | { 6 | public class CorrectQueryStringTypesActionFilter : ActionFilterAttribute 7 | { 8 | public override void OnActionExecuting(ActionExecutingContext filterContext) 9 | { 10 | base.OnActionExecuting(filterContext); 11 | var dynamicController = (DynamicControllerBase) filterContext.Controller; 12 | dynamicController.CorrectQueryStringTypes(); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /DynamicMVC.UI/DynamicMVC/DynamicMVCContextOptions.cs: -------------------------------------------------------------------------------- 1 | namespace DynamicMVC.UI.DynamicMVC 2 | { 3 | public class DynamicMVCContextOptions 4 | { 5 | public DynamicMVCContextOptions() 6 | { 7 | DynamicDropDownRecordLimit = 50; 8 | } 9 | 10 | public long DynamicDropDownRecordLimit { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /DynamicMVC.UI/DynamicMVC/Interfaces/IDynamicCreateViewModelBuilder.cs: -------------------------------------------------------------------------------- 1 | using DynamicMVC.DynamicEntityMetadataLibrary.Models; 2 | using DynamicMVC.UI.DynamicMVC.ViewModels; 3 | 4 | namespace DynamicMVC.UI.DynamicMVC.Interfaces 5 | { 6 | public interface IDynamicCreateViewModelBuilder 7 | { 8 | DynamicCreateViewModel Build(DynamicEntityMetadata dynamicEntityMetadata, dynamic createModel, string returnUrl); 9 | } 10 | } -------------------------------------------------------------------------------- /DynamicMVC.UI/DynamicMVC/Interfaces/IDynamicDeleteViewModelBuilder.cs: -------------------------------------------------------------------------------- 1 | using DynamicMVC.DynamicEntityMetadataLibrary.Models; 2 | using DynamicMVC.UI.DynamicMVC.ViewModels; 3 | 4 | namespace DynamicMVC.UI.DynamicMVC.Interfaces 5 | { 6 | public interface IDynamicDeleteViewModelBuilder 7 | { 8 | DynamicDeleteViewModel Build(DynamicEntityMetadata dynamicEntityMetadata, dynamic deleteModel, string returnUrl); 9 | } 10 | } -------------------------------------------------------------------------------- /DynamicMVC.UI/DynamicMVC/Interfaces/IDynamicDetailsViewModelBuilder.cs: -------------------------------------------------------------------------------- 1 | using DynamicMVC.DynamicEntityMetadataLibrary.Models; 2 | using DynamicMVC.UI.DynamicMVC.ViewModels; 3 | 4 | namespace DynamicMVC.UI.DynamicMVC.Interfaces 5 | { 6 | public interface IDynamicDetailsViewModelBuilder 7 | { 8 | DynamicDetailsViewModel Build(DynamicEntityMetadata dynamicEntityMetadata, dynamic detailModel); 9 | } 10 | } -------------------------------------------------------------------------------- /DynamicMVC.UI/DynamicMVC/Interfaces/IDynamicDisplayName.cs: -------------------------------------------------------------------------------- 1 | #pragma warning disable 1591 2 | namespace DynamicMVC.UI.DynamicMVC.Interfaces 3 | { 4 | public interface IDynamicDisplayName 5 | { 6 | string DisplayName { get; set; } 7 | string ViewModelPropertyName { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /DynamicMVC.UI/DynamicMVC/Interfaces/IDynamicDisplayPartialModelBuilder.cs: -------------------------------------------------------------------------------- 1 | using DynamicMVC.DynamicEntityMetadataLibrary.Models; 2 | using DynamicMVC.UI.DynamicMVC.ViewModels.DynamicPropertyViewModels; 3 | 4 | namespace DynamicMVC.UI.DynamicMVC.Interfaces 5 | { 6 | public interface IDynamicDisplayPartialModelBuilder 7 | { 8 | string DynamicDisplayPartialName(); 9 | void Build(DynamicPropertyMetadata dynamicPropertyMetadata, DynamicPropertyIndexViewModel dynamicPropertyIndexViewModel, dynamic item); 10 | } 11 | } -------------------------------------------------------------------------------- /DynamicMVC.UI/DynamicMVC/Interfaces/IDynamicEditViewModelBuilder.cs: -------------------------------------------------------------------------------- 1 | using DynamicMVC.DynamicEntityMetadataLibrary.Models; 2 | using DynamicMVC.UI.DynamicMVC.ViewModels; 3 | 4 | namespace DynamicMVC.UI.DynamicMVC.Interfaces 5 | { 6 | public interface IDynamicEditViewModelBuilder 7 | { 8 | DynamicEditViewModel Build(DynamicEntityMetadata dynamicEntityMetadata, dynamic editModel, string returnUrl); 9 | } 10 | } -------------------------------------------------------------------------------- /DynamicMVC.UI/DynamicMVC/Interfaces/IDynamicEditorModelBuilder.cs: -------------------------------------------------------------------------------- 1 | using DynamicMVC.DynamicEntityMetadataLibrary.Models; 2 | using DynamicMVC.UI.DynamicMVC.ViewModels.DynamicPropertyViewModels; 3 | 4 | namespace DynamicMVC.UI.DynamicMVC.Interfaces 5 | { 6 | public interface IDynamicEditorModelBuilder 7 | { 8 | string DynamicEditorName(); 9 | void Build(DynamicPropertyMetadata dynamicPropertyMetadata, DynamicPropertyEditorViewModel dynamicPropertyViewModel, dynamic item); 10 | } 11 | } -------------------------------------------------------------------------------- /DynamicMVC.UI/DynamicMVC/Interfaces/IDynamicEntitySearchManager.cs: -------------------------------------------------------------------------------- 1 | using DynamicMVC.DynamicEntityMetadataLibrary.Models; 2 | 3 | namespace DynamicMVC.UI.DynamicMVC.Interfaces 4 | { 5 | public interface IDynamicEntitySearchManager 6 | { 7 | DynamicEntityMetadata DynamicEntityMetadata { get; } 8 | } 9 | } -------------------------------------------------------------------------------- /DynamicMVC.UI/DynamicMVC/Interfaces/IDynamicFilter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using DynamicMVC.DynamicEntityMetadataLibrary.Models; 4 | 5 | namespace DynamicMVC.UI.DynamicMVC.Interfaces 6 | { 7 | public interface IDynamicFilter 8 | { 9 | IQueryable Filter(IQueryable qry); 10 | void ViewModelCreated(DynamicPropertyMetadata dynamicPropertyMetadata, IDictionary controlParameters); 11 | string PropertyName { get; set; } 12 | RouteValueDictionaryWrapper RouteValueDictionaryWrapper { get; set; } 13 | int Order { get; set; } 14 | string QueryStringName { get; set; } 15 | string DynamicFilterViewName(); 16 | bool FilterIsApplied(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /DynamicMVC.UI/DynamicMVC/Interfaces/IDynamicFilterFactory.cs: -------------------------------------------------------------------------------- 1 | using DynamicMVC.Annotations; 2 | using DynamicMVC.DynamicEntityMetadataLibrary.Models; 3 | 4 | namespace DynamicMVC.UI.DynamicMVC.Interfaces 5 | { 6 | public interface IDynamicFilterFactory 7 | { 8 | IDynamicFilter GetDynamicFilter(string dynamicFilterViewName, DynamicPropertyMetadata dynamicPropertyMetadata, RouteValueDictionaryWrapper routeValueDictionaryWrapper); 9 | IDynamicFilter GetDynamicFilter(DynamicFilterUIHintAttribute dynamicFilterUIHintAttribute, DynamicPropertyMetadata dynamicPropertyMetadata, RouteValueDictionaryWrapper routeValueDictionaryWrapper); 10 | 11 | } 12 | } -------------------------------------------------------------------------------- /DynamicMVC.UI/DynamicMVC/Interfaces/IDynamicFilterManager.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using DynamicMVC.DynamicEntityMetadataLibrary.Models; 3 | using DynamicMVC.UI.DynamicMVC.ViewModels.DynamicPropertyViewModels; 4 | 5 | namespace DynamicMVC.UI.DynamicMVC.Interfaces 6 | { 7 | public interface IDynamicFilterManager 8 | { 9 | IEnumerable GetFilterPropertyViewModels(DynamicEntityMetadata dynamicEntityMetadata, RouteValueDictionaryWrapper routeValueDictionaryWrapper); 10 | string GetFilterMessage(DynamicEntityMetadata dynamicEntityMetadata, RouteValueDictionaryWrapper routeValueDictionaryWrapper); 11 | IEnumerable GetDynamicFilters(DynamicEntityMetadata dynamicEntityMetadata, RouteValueDictionaryWrapper routeValueDictionaryWrapper); 12 | } 13 | } -------------------------------------------------------------------------------- /DynamicMVC.UI/DynamicMVC/Interfaces/IDynamicIndexPageViewModelBuilder.cs: -------------------------------------------------------------------------------- 1 | using DynamicMVC.DynamicEntityMetadataLibrary.Models; 2 | using DynamicMVC.UI.DynamicMVC.ViewModels; 3 | 4 | namespace DynamicMVC.UI.DynamicMVC.Interfaces 5 | { 6 | public interface IDynamicIndexPageViewModelBuilder 7 | { 8 | DynamicIndexPageViewModel Build(DynamicEntityMetadata dynamicEntityMetadata); 9 | } 10 | } -------------------------------------------------------------------------------- /DynamicMVC.UI/DynamicMVC/Interfaces/IDynamicIndexViewModelBuilder.cs: -------------------------------------------------------------------------------- 1 | using DynamicMVC.DynamicEntityMetadataLibrary.Models; 2 | using DynamicMVC.UI.DynamicMVC.ViewModels; 3 | 4 | namespace DynamicMVC.UI.DynamicMVC.Interfaces 5 | { 6 | public interface IDynamicIndexViewModelBuilder 7 | { 8 | DynamicIndexViewModel Build(DynamicEntityMetadata dynamicEntityMetadata); 9 | } 10 | } -------------------------------------------------------------------------------- /DynamicMVC.UI/DynamicMVC/Interfaces/IDynamicPropertyViewModelBuilder.cs: -------------------------------------------------------------------------------- 1 | using DynamicMVC.DynamicEntityMetadataLibrary.Models; 2 | using DynamicMVC.UI.DynamicMVC.ViewModels.DynamicPropertyViewModels; 3 | 4 | namespace DynamicMVC.UI.DynamicMVC.Interfaces 5 | { 6 | public interface IDynamicPropertyViewModelBuilder 7 | { 8 | DynamicPropertyIndexViewModel BuildDynamicPropertyIndexViewModel(DynamicPropertyMetadata dynamicPropertyMetadata); 9 | DynamicPropertyEditorViewModel BuildDynamicPropertyEditorViewModelForEdit(DynamicPropertyMetadata dynamicPropertyMetadata); 10 | DynamicPropertyEditorViewModel BuildDynamicPropertyEditorViewModelForCreate(DynamicPropertyMetadata dynamicPropertyMetadata); 11 | DynamicPropertyEditorViewModel BuildDynamicPropertyEditorViewModelForDetails(DynamicPropertyMetadata dynamicPropertyMetadata); 12 | } 13 | } -------------------------------------------------------------------------------- /DynamicMVC.UI/DynamicMVC/Interfaces/IPagingManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using DynamicMVC.DynamicEntityMetadataLibrary.Models; 6 | 7 | namespace DynamicMVC.UI.DynamicMVC.Interfaces 8 | { 9 | public interface IPagingManager 10 | { 11 | string PreviousClassName(RouteValueDictionaryWrapper routeValueDictionaryWrapper); 12 | string NextClassName(RouteValueDictionaryWrapper routeValueDictionaryWrapper); 13 | string PagingMessage(RouteValueDictionaryWrapper routeValueDictionaryWrapper); 14 | void SetFilters(DynamicEntityMetadata dynamicEntityMetadata, IEnumerable> filters); 15 | void ValidatePagingParameters(RouteValueDictionaryWrapper routeValueDictionaryWrapper); 16 | IEnumerable GetItems(DynamicEntityMetadata dynamicEntityMetadata, RouteValueDictionaryWrapper routeValueDictionaryWrapper); 17 | } 18 | } -------------------------------------------------------------------------------- /DynamicMVC.UI/DynamicMVC/Interfaces/IRequestManager.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Web.Routing; 3 | using DynamicMVC.DynamicEntityMetadataLibrary.Models; 4 | 5 | namespace DynamicMVC.UI.DynamicMVC.Interfaces 6 | { 7 | public interface IRequestManager 8 | { 9 | IDictionary RouteDataDictionary { get; set; } 10 | RouteValueDictionaryWrapper QueryStringDictionary { get; set; } 11 | void CorrectQuerystringTypes(DynamicEntityMetadata dynamicEntityMetadata); 12 | bool PagingParametersDoNotExist(); 13 | void AddPagingParameters(string defaultOrderBy, int page, int pageSize, string keyName); 14 | RouteValueDictionaryWrapper RouteValueDictionaryWrapper(); 15 | string OrderBy(); 16 | string ViewProperties(); 17 | } 18 | } -------------------------------------------------------------------------------- /DynamicMVC.UI/DynamicMVC/Interfaces/ISelectListItemManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Web.Mvc; 4 | 5 | namespace DynamicMVC.UI.DynamicMVC.Interfaces 6 | { 7 | public interface ISelectListItemManager 8 | { 9 | List GetSelectListItems(Type type, string valueFieldName, string textFieldName, object selectedItem = null, string nullText = null); 10 | List GetSelectListItemForBooleanDropDown(bool? value, string nullText); 11 | } 12 | } -------------------------------------------------------------------------------- /DynamicMVC.UI/DynamicMVC/Interfaces/IUrlManager.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Mvc; 2 | 3 | namespace DynamicMVC.UI.DynamicMVC.Interfaces 4 | { 5 | public interface IUrlManager 6 | { 7 | UrlHelper Url { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /DynamicMVC.UI/DynamicMVC/Managers/UrlManager.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | using System.Web.Mvc; 3 | using System.Web.Routing; 4 | using DynamicMVC.UI.DynamicMVC.Interfaces; 5 | 6 | namespace DynamicMVC.UI.DynamicMVC.Managers 7 | { 8 | public class UrlManager : IUrlManager 9 | { 10 | public UrlManager() 11 | { 12 | Url = new UrlHelper(HttpContext.Current.Request.RequestContext, RouteTable.Routes); 13 | } 14 | 15 | public UrlHelper Url { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /DynamicMVC.UI/DynamicMVC/ViewModelBuilders/DynamicDeleteViewModelBuilder.cs: -------------------------------------------------------------------------------- 1 | using DynamicMVC.DynamicEntityMetadataLibrary.Models; 2 | using DynamicMVC.UI.DynamicMVC.Interfaces; 3 | using DynamicMVC.UI.DynamicMVC.ViewModels; 4 | 5 | namespace DynamicMVC.UI.DynamicMVC.ViewModelBuilders 6 | { 7 | public class DynamicDeleteViewModelBuilder : IDynamicDeleteViewModelBuilder 8 | { 9 | public DynamicDeleteViewModel Build(DynamicEntityMetadata dynamicEntityMetadata, dynamic deleteModel, string returnUrl) 10 | { 11 | var dynamicDeleteViewModel = new DynamicDeleteViewModel(); 12 | dynamicDeleteViewModel.TypeName = dynamicEntityMetadata.TypeName(); 13 | dynamicDeleteViewModel.Header = "Delete " + dynamicEntityMetadata.TypeName(); 14 | dynamicDeleteViewModel.ReturnUrl = returnUrl; 15 | return dynamicDeleteViewModel; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /DynamicMVC.UI/DynamicMVC/ViewModels/DynamicControls/DynamicEditorViewModel.cs: -------------------------------------------------------------------------------- 1 | using DynamicMVC.UI.DynamicMVC.ViewModels.DynamicPropertyViewModels; 2 | 3 | namespace DynamicMVC.UI.DynamicMVC.ViewModels.DynamicControls 4 | { 5 | public class DynamicEditorViewModel 6 | { 7 | public string ViewModelPropertyName { get; set; } 8 | public string DynamicEditorName { get; set; } 9 | public DynamicPropertyEditorViewModel DynamicPropertyEditorViewModel { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /DynamicMVC.UI/DynamicMVC/ViewModels/DynamicControls/MessageViewModel.cs: -------------------------------------------------------------------------------- 1 | using DynamicMVC.Shared.Enums; 2 | 3 | namespace DatabaseManagerMVC.UI.DynamicMVC.ViewModels.DynamicControls 4 | { 5 | public class MessageViewModel 6 | { 7 | public MessageViewModel() 8 | { 9 | MessageTypeEnum = MessageTypeEnum.Success; 10 | } 11 | 12 | public MessageViewModel(string message) 13 | { 14 | Message = message; 15 | } 16 | 17 | public MessageViewModel(MessageTypeEnum messageTypeEnum, string message): this(message) 18 | { 19 | MessageTypeEnum = messageTypeEnum; 20 | } 21 | 22 | public MessageTypeEnum MessageTypeEnum { get; set; } 23 | public string Message { get; set; } 24 | } 25 | } -------------------------------------------------------------------------------- /DynamicMVC.UI/DynamicMVC/ViewModels/DynamicDeleteViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace DynamicMVC.UI.DynamicMVC.ViewModels 2 | { 3 | public class DynamicDeleteViewModel 4 | { 5 | public DynamicDeleteViewModel() 6 | { 7 | ButtonText = "Delete"; 8 | } 9 | 10 | public string Header { get; set; } 11 | public string TypeName { get; set; } 12 | public string ButtonText { get; set; } 13 | public string ReturnUrl { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /DynamicMVC.UI/DynamicMVC/ViewModels/DynamicDetailsViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using DynamicMVC.DynamicEntityMetadataLibrary.Models; 3 | using DynamicMVC.UI.DynamicMVC.ViewModels.DynamicControls; 4 | 5 | namespace DynamicMVC.UI.DynamicMVC.ViewModels 6 | { 7 | public class DynamicDetailsViewModel 8 | { 9 | public DynamicDetailsViewModel() 10 | { 11 | Title = "Details"; 12 | DynamicEditorViewModels = new HashSet(); 13 | DynamicUIMethods = new HashSet(); 14 | } 15 | 16 | public string Title { get; set; } 17 | public string Header { get; set; } 18 | public string TypeName { get; set; } 19 | public dynamic Item { get; set; } 20 | 21 | public ICollection DynamicEditorViewModels { get; set; } 22 | public ICollection DynamicUIMethods { get; set; } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /DynamicMVC.UI/DynamicMVC/ViewModels/DynamicEditorViewModels/DynamicEditorAutoCompleteViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace DynamicMVC.UI.DynamicMVC.ViewModels.DynamicEditorViewModels 2 | { 3 | /// 4 | /// 5 | /// 6 | public class DynamicEditorAutoCompleteViewModel 7 | { 8 | public string TypeName { get; set; } 9 | public string SelectedText { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /DynamicMVC.UI/DynamicMVC/ViewModels/DynamicEditorViewModels/DynamicEditorDropDownViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Web.Mvc; 4 | 5 | namespace DynamicMVC.UI.DynamicMVC.ViewModels.DynamicEditorViewModels 6 | { 7 | public class DynamicEditorDropDownViewModel 8 | { 9 | public DynamicEditorDropDownViewModel() 10 | { 11 | 12 | } 13 | 14 | public DynamicEditorDropDownViewModel(Type type, string dataTextField, string dataValueField) 15 | : this() 16 | { 17 | Type = type; 18 | DataTextField = dataTextField; 19 | DataValueField = dataValueField; 20 | } 21 | public Type Type { get; set; } 22 | public string DataTextField { get; set; } 23 | public string DataValueField { get; set; } 24 | public List SelectListItems { get; set; } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /DynamicMVC.UI/DynamicMVC/ViewModels/DynamicEditorViewModels/DynamicEditorHyperlinkViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace DynamicMVC.UI.DynamicMVC.ViewModels.DynamicEditorViewModels 2 | { 3 | public class DynamicEditorHyperlinkViewModel 4 | { 5 | public DynamicEditorHyperlinkViewModel() 6 | { 7 | RouteValueDictionaryWrapper = new RouteValueDictionaryWrapper(); 8 | } 9 | public DynamicEditorHyperlinkViewModel(string displayName, string controllerName, string actionName) 10 | : this() 11 | { 12 | DisplayName = displayName; 13 | ControllerName = controllerName; 14 | ActionName = actionName; 15 | } 16 | public string DisplayName { get; set; } 17 | public string ControllerName { get; set; } 18 | public string ActionName { get; set; } 19 | 20 | public RouteValueDictionaryWrapper RouteValueDictionaryWrapper { get; set; } 21 | 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /DynamicMVC.UI/DynamicMVC/ViewModels/DynamicIndexItemViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Web.Routing; 3 | using DynamicMVC.UI.DynamicMVC.ViewModels.DynamicPropertyViewModels; 4 | 5 | namespace DynamicMVC.UI.DynamicMVC.ViewModels 6 | { 7 | public class DynamicIndexItemViewModel 8 | { 9 | public DynamicIndexItemViewModel() 10 | { 11 | DynamicPropertyIndexViewModels = new List(); 12 | } 13 | 14 | public bool ShowDelete { get; set; } 15 | public bool ShowEdit { get; set; } 16 | public bool ShowDetails { get; set; } 17 | public dynamic Item { get; set; } 18 | public string TypeName { get; set; } 19 | public RouteValueDictionaryWrapper RouteValueDictionaryWrapper { get; set; } 20 | 21 | public List DynamicPropertyIndexViewModels { get; set; } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /DynamicMVC.UI/DynamicMVC/ViewModels/DynamicIndexViewModel.cs: -------------------------------------------------------------------------------- 1 | using DynamicMVC.UI.DynamicMVC.ViewModels.Partials; 2 | 3 | namespace DynamicMVC.UI.DynamicMVC.ViewModels 4 | { 5 | public class DynamicIndexViewModel 6 | { 7 | public DynamicIndexViewModel() 8 | { 9 | Title = "Index"; 10 | } 11 | 12 | public string Title { get; set; } 13 | public string Header { get; set; } 14 | public string TypeName { get; set; } 15 | public string FilterMessage { get; set; } 16 | public RouteValueDictionaryWrapper RouteValueDictionaryWrapper { get; set; } 17 | 18 | public DynamicIndexFiltersViewModel DynamicIndexFiltersViewModel { get; set; } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /DynamicMVC.UI/DynamicMVC/ViewModels/DynamicPropertyViewModels/DynamicFilterViewModel.cs: -------------------------------------------------------------------------------- 1 | using DynamicMVC.DynamicEntityMetadataLibrary.Models; 2 | using DynamicMVC.UI.DynamicMVC.Interfaces; 3 | 4 | namespace DynamicMVC.UI.DynamicMVC.ViewModels.DynamicPropertyViewModels 5 | { 6 | public class DynamicFilterViewModel : DynamicPropertyViewModel 7 | { 8 | 9 | public DynamicFilterViewModel(DynamicPropertyMetadata dynamicPropertyMetadata) : base(dynamicPropertyMetadata) 10 | { 11 | } 12 | 13 | public string DynamicFilterViewName { get; set; } 14 | public IDynamicFilter FilterModel { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /DynamicMVC.UI/DynamicMVC/ViewModels/DynamicPropertyViewModels/DynamicPropertyEditorViewModel.cs: -------------------------------------------------------------------------------- 1 | using DynamicMVC.DynamicEntityMetadataLibrary.Models; 2 | using DynamicMVC.UI.DynamicMVC.ViewModels.DynamicEditorViewModels; 3 | 4 | namespace DynamicMVC.UI.DynamicMVC.ViewModels.DynamicPropertyViewModels 5 | { 6 | public class DynamicPropertyEditorViewModel : DynamicPropertyViewModel 7 | { 8 | public DynamicPropertyEditorViewModel(DynamicPropertyMetadata dynamicPropertyMetadata) : base(dynamicPropertyMetadata) 9 | { 10 | 11 | } 12 | 13 | public string DynamicEditorName { get; set; } 14 | public DynamicEditorHyperlinkViewModel DynamicEditorHyperlinkViewModel { get; set; } 15 | public DynamicEditorDropDownViewModel DynamicEditorDropDownViewModel { get; set; } 16 | public DynamicEditorAutoCompleteViewModel DynamicEditorAutoCompleteViewModel { get; set; } 17 | } 18 | } -------------------------------------------------------------------------------- /DynamicMVC.UI/DynamicMVC/ViewModels/DynamicPropertyViewModels/DynamicPropertyViewModel.cs: -------------------------------------------------------------------------------- 1 | using DynamicMVC.DynamicEntityMetadataLibrary.Models; 2 | using DynamicMVC.UI.DynamicMVC.Interfaces; 3 | 4 | #pragma warning disable 1591 5 | 6 | namespace DynamicMVC.UI.DynamicMVC.ViewModels.DynamicPropertyViewModels 7 | { 8 | public class DynamicPropertyViewModel : IDynamicDisplayName 9 | { 10 | public DynamicPropertyViewModel(DynamicPropertyMetadata dynamicPropertyMetadata) 11 | { 12 | ViewModelPropertyName = dynamicPropertyMetadata.PropertyName(); 13 | PropertyName = dynamicPropertyMetadata.PropertyName(); 14 | DisplayName = dynamicPropertyMetadata.DisplayName(); 15 | } 16 | 17 | public string ViewModelPropertyName { get; set; } 18 | public string PropertyName { get; set; } 19 | public string DisplayName { get; set; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="DynamicMVC.UI.MvcApplication" Language="C#" %> 2 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Migrations/201407261420404_modifiedproduct.cs: -------------------------------------------------------------------------------- 1 | namespace DynamicMVC.UI.Migrations 2 | { 3 | using System; 4 | using System.Data.Entity.Migrations; 5 | 6 | public partial class modifiedproduct : DbMigration 7 | { 8 | public override void Up() 9 | { 10 | DropForeignKey("dbo.Orders", "Product_Id", "dbo.Products"); 11 | DropIndex("dbo.Orders", new[] { "Product_Id" }); 12 | AddColumn("dbo.Products", "CreateDate", c => c.DateTime(nullable: false)); 13 | DropColumn("dbo.Orders", "Product_Id"); 14 | } 15 | 16 | public override void Down() 17 | { 18 | AddColumn("dbo.Orders", "Product_Id", c => c.Int()); 19 | DropColumn("dbo.Products", "CreateDate"); 20 | CreateIndex("dbo.Orders", "Product_Id"); 21 | AddForeignKey("dbo.Orders", "Product_Id", "dbo.Products", "Id"); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Migrations/201601162209172_ishotorder.cs: -------------------------------------------------------------------------------- 1 | namespace DynamicMVC.UI.Migrations 2 | { 3 | using System; 4 | using System.Data.Entity.Migrations; 5 | 6 | public partial class ishotorder : DbMigration 7 | { 8 | public override void Up() 9 | { 10 | AddColumn("dbo.Orders", "IsHotOrder", c => c.Boolean(nullable: false)); 11 | } 12 | 13 | public override void Down() 14 | { 15 | DropColumn("dbo.Orders", "IsHotOrder"); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Migrations/201602211514393_requesteddatetime.cs: -------------------------------------------------------------------------------- 1 | namespace DynamicMVC.UI.Migrations 2 | { 3 | using System; 4 | using System.Data.Entity.Migrations; 5 | 6 | public partial class requesteddatetime : DbMigration 7 | { 8 | public override void Up() 9 | { 10 | AddColumn("dbo.Orders", "RequestedDateTime", c => c.DateTime()); 11 | } 12 | 13 | public override void Down() 14 | { 15 | DropColumn("dbo.Orders", "RequestedDateTime"); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Migrations/201602211555076_notes.cs: -------------------------------------------------------------------------------- 1 | namespace DynamicMVC.UI.Migrations 2 | { 3 | using System; 4 | using System.Data.Entity.Migrations; 5 | 6 | public partial class notes : DbMigration 7 | { 8 | public override void Up() 9 | { 10 | AddColumn("dbo.Orders", "Notes", c => c.String()); 11 | } 12 | 13 | public override void Down() 14 | { 15 | DropColumn("dbo.Orders", "Notes"); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Models/CustomerRegion.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.Linq; 5 | using System.Text; 6 | using DynamicMVC.Annotations; 7 | 8 | namespace DynamicMVC.UI.Models 9 | { 10 | [DynamicEntity(ShowDetails = false)] 11 | [DynamicMenuItem("Customer Regions", "Admin")] 12 | [DynamicHeader(IndexHeader = "Customer Regions")] 13 | public class CustomerRegion 14 | { 15 | public CustomerRegion() 16 | { 17 | Customers = new HashSet(); 18 | } 19 | public int Id { get; set; } 20 | [Required] 21 | public string Name { get; set; } 22 | 23 | public ICollection Customers { get; set; } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Models/OrderStatus.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.Linq; 5 | using System.Text; 6 | using DynamicMVC.Annotations; 7 | 8 | namespace DynamicMVC.UI.Models 9 | { 10 | [DynamicEntity] 11 | public class OrderStatus 12 | { 13 | public OrderStatus() 14 | { 15 | Orders = new HashSet(); 16 | } 17 | public int Id { get; set; } 18 | [Required] 19 | public string Name { get; set; } 20 | public ICollection Orders { get; set; } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Models/OrderType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.Linq; 5 | using System.Web; 6 | using DynamicMVC.Annotations; 7 | 8 | namespace DynamicMVC.UI.Models 9 | { 10 | [DynamicEntity] 11 | public class OrderType 12 | { 13 | public OrderType() 14 | { 15 | Orders = new List(); 16 | } 17 | public int Id { get; set; } 18 | [Required] 19 | public string Name { get; set; } 20 | 21 | public ICollection Orders { get; set; } 22 | } 23 | } -------------------------------------------------------------------------------- /DynamicMVC.UI/Models/Product.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.Linq; 5 | using System.Web; 6 | using DynamicMVC.Annotations; 7 | 8 | namespace DynamicMVC.UI.Models 9 | { 10 | [DynamicEntity(ShowDetails = false)] 11 | [DynamicHeader(IndexHeader = "Products")] 12 | [DynamicMenuItem("Product", "Order Entry")] 13 | public class Product 14 | { 15 | public Product() 16 | { 17 | CreateDate=DateTime.Now; 18 | OrderLines = new HashSet(); 19 | } 20 | public int Id { get; set; } 21 | public DateTime CreateDate { get; set; } 22 | [Required] 23 | public string Name { get; set; } 24 | [DataType(DataType.Currency)] 25 | public decimal Price { get; set; } 26 | 27 | public ICollection OrderLines { get; set; } 28 | } 29 | } -------------------------------------------------------------------------------- /DynamicMVC.UI/Scripts/Select2-locales/select2_locale_da.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Danish translation. 3 | * 4 | * Author: Anders Jenbo 5 | */ 6 | (function ($) { 7 | "use strict"; 8 | 9 | $.extend($.fn.select2.defaults, { 10 | formatNoMatches: function () { return "Ingen resultater fundet"; }, 11 | formatInputTooShort: function (input, min) { var n = min - input.length; return "Angiv venligst " + n + " tegn mere"; }, 12 | formatInputTooLong: function (input, max) { var n = input.length - max; return "Angiv venligst " + n + " tegn mindre"; }, 13 | formatSelectionTooBig: function (limit) { return "Du kan kun vælge " + limit + " emne" + (limit === 1 ? "" : "r"); }, 14 | formatLoadMore: function (pageNumber) { return "Indlæser flere resultater…"; }, 15 | formatSearching: function () { return "Søger…"; } 16 | }); 17 | })(jQuery); 18 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Scripts/Select2-locales/select2_locale_es.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Spanish translation 3 | */ 4 | (function ($) { 5 | "use strict"; 6 | 7 | $.extend($.fn.select2.defaults, { 8 | formatNoMatches: function () { return "No se encontraron resultados"; }, 9 | formatInputTooShort: function (input, min) { var n = min - input.length; return "Por favor, introduzca " + n + " car" + (n == 1? "ácter" : "acteres"); }, 10 | formatInputTooLong: function (input, max) { var n = input.length - max; return "Por favor, elimine " + n + " car" + (n == 1? "ácter" : "acteres"); }, 11 | formatSelectionTooBig: function (limit) { return "Sólo puede seleccionar " + limit + " elemento" + (limit == 1 ? "" : "s"); }, 12 | formatLoadMore: function (pageNumber) { return "Cargando más resultados…"; }, 13 | formatSearching: function () { return "Buscando…"; } 14 | }); 15 | })(jQuery); 16 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Scripts/Select2-locales/select2_locale_et.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Estonian translation. 3 | * 4 | * Author: Kuldar Kalvik 5 | */ 6 | (function ($) { 7 | "use strict"; 8 | 9 | $.extend($.fn.select2.defaults, { 10 | formatNoMatches: function () { return "Tulemused puuduvad"; }, 11 | formatInputTooShort: function (input, min) { var n = min - input.length; return "Sisesta " + n + " täht" + (n == 1 ? "" : "e") + " rohkem"; }, 12 | formatInputTooLong: function (input, max) { var n = input.length - max; return "Sisesta " + n + " täht" + (n == 1? "" : "e") + " vähem"; }, 13 | formatSelectionTooBig: function (limit) { return "Saad vaid " + limit + " tulemus" + (limit == 1 ? "e" : "t") + " valida"; }, 14 | formatLoadMore: function (pageNumber) { return "Laen tulemusi.."; }, 15 | formatSearching: function () { return "Otsin.."; } 16 | }); 17 | })(jQuery); 18 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Scripts/Select2-locales/select2_locale_he.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Hebrew translation. 3 | * 4 | * Author: Yakir Sitbon 5 | */ 6 | (function ($) { 7 | "use strict"; 8 | 9 | $.extend($.fn.select2.defaults, { 10 | formatNoMatches: function () { return "לא נמצאו התאמות"; }, 11 | formatInputTooShort: function (input, min) { var n = min - input.length; return "נא להזין עוד " + n + " תווים נוספים"; }, 12 | formatInputTooLong: function (input, max) { var n = input.length - max; return "נא להזין פחות " + n + " תווים"; }, 13 | formatSelectionTooBig: function (limit) { return "ניתן לבחור " + limit + " פריטים"; }, 14 | formatLoadMore: function (pageNumber) { return "טוען תוצאות נוספות…"; }, 15 | formatSearching: function () { return "מחפש…"; } 16 | }); 17 | })(jQuery); 18 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Scripts/Select2-locales/select2_locale_hu.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Hungarian translation 3 | */ 4 | (function ($) { 5 | "use strict"; 6 | 7 | $.extend($.fn.select2.defaults, { 8 | formatNoMatches: function () { return "Nincs találat."; }, 9 | formatInputTooShort: function (input, min) { var n = min - input.length; return "Túl rövid. Még " + n + " karakter hiányzik."; }, 10 | formatInputTooLong: function (input, max) { var n = input.length - max; return "Túl hosszú. " + n + " karakterrel több, mint kellene."; }, 11 | formatSelectionTooBig: function (limit) { return "Csak " + limit + " elemet lehet kiválasztani."; }, 12 | formatLoadMore: function (pageNumber) { return "Töltés…"; }, 13 | formatSearching: function () { return "Keresés…"; } 14 | }); 15 | })(jQuery); 16 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Scripts/Select2-locales/select2_locale_id.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Indonesian translation. 3 | * 4 | * Author: Ibrahim Yusuf 5 | */ 6 | (function ($) { 7 | "use strict"; 8 | 9 | $.extend($.fn.select2.defaults, { 10 | formatNoMatches: function () { return "Tidak ada data yang sesuai"; }, 11 | formatInputTooShort: function (input, min) { var n = min - input.length; return "Masukkan " + n + " huruf lagi" + (n == 1 ? "" : "s"); }, 12 | formatInputTooLong: function (input, max) { var n = input.length - max; return "Hapus " + n + " huruf" + (n == 1 ? "" : "s"); }, 13 | formatSelectionTooBig: function (limit) { return "Anda hanya dapat memilih " + limit + " pilihan" + (limit == 1 ? "" : "s"); }, 14 | formatLoadMore: function (pageNumber) { return "Mengambil data…"; }, 15 | formatSearching: function () { return "Mencari…"; } 16 | }); 17 | })(jQuery); 18 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Scripts/Select2-locales/select2_locale_is.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Icelandic translation. 3 | */ 4 | (function ($) { 5 | "use strict"; 6 | 7 | $.extend($.fn.select2.defaults, { 8 | formatNoMatches: function () { return "Ekkert fannst"; }, 9 | formatInputTooShort: function (input, min) { var n = min - input.length; return "Vinsamlegast skrifið " + n + " staf" + (n > 1 ? "i" : "") + " í viðbót"; }, 10 | formatInputTooLong: function (input, max) { var n = input.length - max; return "Vinsamlegast styttið texta um " + n + " staf" + (n > 1 ? "i" : ""); }, 11 | formatSelectionTooBig: function (limit) { return "Þú getur aðeins valið " + limit + " atriði"; }, 12 | formatLoadMore: function (pageNumber) { return "Sæki fleiri niðurstöður…"; }, 13 | formatSearching: function () { return "Leita…"; } 14 | }); 15 | })(jQuery); 16 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Scripts/Select2-locales/select2_locale_it.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Italian translation 3 | */ 4 | (function ($) { 5 | "use strict"; 6 | 7 | $.extend($.fn.select2.defaults, { 8 | formatNoMatches: function () { return "Nessuna corrispondenza trovata"; }, 9 | formatInputTooShort: function (input, min) { var n = min - input.length; return "Inserisci ancora " + n + " caratter" + (n == 1? "e" : "i"); }, 10 | formatInputTooLong: function (input, max) { var n = input.length - max; return "Inserisci " + n + " caratter" + (n == 1? "e" : "i") + " in meno"; }, 11 | formatSelectionTooBig: function (limit) { return "Puoi selezionare solo " + limit + " element" + (limit == 1 ? "o" : "i"); }, 12 | formatLoadMore: function (pageNumber) { return "Caricamento in corso…"; }, 13 | formatSearching: function () { return "Ricerca…"; } 14 | }); 15 | })(jQuery); -------------------------------------------------------------------------------- /DynamicMVC.UI/Scripts/Select2-locales/select2_locale_ja.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Japanese translation. 3 | */ 4 | (function ($) { 5 | "use strict"; 6 | 7 | $.extend($.fn.select2.defaults, { 8 | formatNoMatches: function () { return "該当なし"; }, 9 | formatInputTooShort: function (input, min) { var n = min - input.length; return "後" + n + "文字入れてください"; }, 10 | formatInputTooLong: function (input, max) { var n = input.length - max; return "検索文字列が" + n + "文字長すぎます"; }, 11 | formatSelectionTooBig: function (limit) { return "最多で" + limit + "項目までしか選択できません"; }, 12 | formatLoadMore: function (pageNumber) { return "読込中・・・"; }, 13 | formatSearching: function () { return "検索中・・・"; } 14 | }); 15 | })(jQuery); 16 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Scripts/Select2-locales/select2_locale_ka.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Georgian (Kartuli) translation. 3 | * 4 | * Author: Dimitri Kurashvili dimakura@gmail.com 5 | */ 6 | (function ($) { 7 | "use strict"; 8 | 9 | $.extend($.fn.select2.defaults, { 10 | formatNoMatches: function () { return "ვერ მოიძებნა"; }, 11 | formatInputTooShort: function (input, min) { var n = min - input.length; return "გთხოვთ შეიყვანოთ კიდევ " + n + " სიმბოლო"; }, 12 | formatInputTooLong: function (input, max) { var n = input.length - max; return "გთხოვთ წაშალოთ " + n + " სიმბოლო"; }, 13 | formatSelectionTooBig: function (limit) { return "თქვენ შეგიძლიათ მხოლოდ " + limit + " ჩანაწერის მონიშვნა"; }, 14 | formatLoadMore: function (pageNumber) { return "შედეგის ჩატვირთვა…"; }, 15 | formatSearching: function () { return "ძებნა…"; } 16 | }); 17 | })(jQuery); 18 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Scripts/Select2-locales/select2_locale_ko.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Korean translation. 3 | * 4 | * @author Swen Mun 5 | */ 6 | (function ($) { 7 | "use strict"; 8 | 9 | $.extend($.fn.select2.defaults, { 10 | formatNoMatches: function () { return "결과 없음"; }, 11 | formatInputTooShort: function (input, min) { var n = min - input.length; return "너무 짧습니다. "+n+"글자 더 입력해주세요."; }, 12 | formatInputTooLong: function (input, max) { var n = input.length - max; return "너무 깁니다. "+n+"글자 지워주세요."; }, 13 | formatSelectionTooBig: function (limit) { return "최대 "+limit+"개까지만 선택하실 수 있습니다."; }, 14 | formatLoadMore: function (pageNumber) { return "불러오는 중…"; }, 15 | formatSearching: function () { return "검색 중…"; } 16 | }); 17 | })(jQuery); 18 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Scripts/Select2-locales/select2_locale_ms.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Malay translation. 3 | * 4 | * Author: Kepoweran 5 | */ 6 | (function ($) { 7 | "use strict"; 8 | 9 | $.extend($.fn.select2.defaults, { 10 | formatNoMatches: function () { return "Tiada padanan yang ditemui"; }, 11 | formatInputTooShort: function (input, min) { var n = min - input.length; return "Sila masukkan " + n + " aksara lagi"; }, 12 | formatInputTooLong: function (input, max) { var n = input.length - max; return "Sila hapuskan " + n + " aksara"; }, 13 | formatSelectionTooBig: function (limit) { return "Anda hanya boleh memilih " + limit + " pilihan"; }, 14 | formatLoadMore: function (pageNumber) { return "Sedang memuatkan keputusan…"; }, 15 | formatSearching: function () { return "Mencari…"; } 16 | }); 17 | })(jQuery); 18 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Scripts/Select2-locales/select2_locale_nl.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Dutch translation 3 | */ 4 | (function ($) { 5 | "use strict"; 6 | 7 | $.extend($.fn.select2.defaults, { 8 | formatNoMatches: function () { return "Geen resultaten gevonden"; }, 9 | formatInputTooShort: function (input, min) { var n = min - input.length; return "Vul " + n + " karakter" + (n == 1? "" : "s") + " meer in"; }, 10 | formatInputTooLong: function (input, max) { var n = input.length - max; return "Vul " + n + " karakter" + (n == 1? "" : "s") + " minder in"; }, 11 | formatSelectionTooBig: function (limit) { return "Maximaal " + limit + " item" + (limit == 1 ? "" : "s") + " toegestaan"; }, 12 | formatLoadMore: function (pageNumber) { return "Meer resultaten laden…"; }, 13 | formatSearching: function () { return "Zoeken…"; } 14 | }); 15 | })(jQuery); -------------------------------------------------------------------------------- /DynamicMVC.UI/Scripts/Select2-locales/select2_locale_no.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Norwegian translation. 3 | * 4 | * Author: Torgeir Veimo 5 | */ 6 | (function ($) { 7 | "use strict"; 8 | 9 | $.extend($.fn.select2.defaults, { 10 | formatNoMatches: function () { return "Ingen treff"; }, 11 | formatInputTooShort: function (input, min) { var n = min - input.length; return "Vennligst skriv inn " + n + (n>1 ? " flere tegn" : " tegn til"); }, 12 | formatInputTooLong: function (input, max) { var n = input.length - max; return "Vennligst fjern " + n + " tegn"; }, 13 | formatSelectionTooBig: function (limit) { return "Du kan velge maks " + limit + " elementer"; }, 14 | formatLoadMore: function (pageNumber) { return "Laster flere resultater…"; }, 15 | formatSearching: function () { return "Søker…"; } 16 | }); 17 | })(jQuery); 18 | 19 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Scripts/Select2-locales/select2_locale_pt-BR.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Brazilian Portuguese translation 3 | */ 4 | (function ($) { 5 | "use strict"; 6 | 7 | $.extend($.fn.select2.defaults, { 8 | formatNoMatches: function () { return "Nenhum resultado encontrado"; }, 9 | formatInputTooShort: function (input, min) { var n = min - input.length; return "Digite mais " + n + " caracter" + (n == 1? "" : "es"); }, 10 | formatInputTooLong: function (input, max) { var n = input.length - max; return "Apague " + n + " caracter" + (n == 1? "" : "es"); }, 11 | formatSelectionTooBig: function (limit) { return "Só é possível selecionar " + limit + " elemento" + (limit == 1 ? "" : "s"); }, 12 | formatLoadMore: function (pageNumber) { return "Carregando mais resultados…"; }, 13 | formatSearching: function () { return "Buscando…"; } 14 | }); 15 | })(jQuery); 16 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Scripts/Select2-locales/select2_locale_pt-PT.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Portuguese (Portugal) translation 3 | */ 4 | (function ($) { 5 | "use strict"; 6 | 7 | $.extend($.fn.select2.defaults, { 8 | formatNoMatches: function () { return "Nenhum resultado encontrado"; }, 9 | formatInputTooShort: function (input, min) { var n = min - input.length; return "Introduza " + n + " car" + (n == 1 ? "ácter" : "acteres"); }, 10 | formatInputTooLong: function (input, max) { var n = input.length - max; return "Apague " + n + " car" + (n == 1 ? "ácter" : "acteres"); }, 11 | formatSelectionTooBig: function (limit) { return "Só é possível selecionar " + limit + " elemento" + (limit == 1 ? "" : "s"); }, 12 | formatLoadMore: function (pageNumber) { return "A carregar mais resultados…"; }, 13 | formatSearching: function () { return "A pesquisar…"; } 14 | }); 15 | })(jQuery); 16 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Scripts/Select2-locales/select2_locale_ro.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Romanian translation. 3 | */ 4 | (function ($) { 5 | "use strict"; 6 | 7 | $.extend($.fn.select2.defaults, { 8 | formatNoMatches: function () { return "Nu a fost găsit nimic"; }, 9 | formatInputTooShort: function (input, min) { var n = min - input.length; return "Vă rugăm să introduceți incă " + n + " caracter" + (n == 1 ? "" : "e"); }, 10 | formatInputTooLong: function (input, max) { var n = input.length - max; return "Vă rugăm să introduceți mai puțin de " + n + " caracter" + (n == 1? "" : "e"); }, 11 | formatSelectionTooBig: function (limit) { return "Aveți voie să selectați cel mult " + limit + " element" + (limit == 1 ? "" : "e"); }, 12 | formatLoadMore: function (pageNumber) { return "Se încarcă…"; }, 13 | formatSearching: function () { return "Căutare…"; } 14 | }); 15 | })(jQuery); 16 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Scripts/Select2-locales/select2_locale_sv.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Swedish translation. 3 | * 4 | * Author: Jens Rantil 5 | */ 6 | (function ($) { 7 | "use strict"; 8 | 9 | $.extend($.fn.select2.defaults, { 10 | formatNoMatches: function () { return "Inga träffar"; }, 11 | formatInputTooShort: function (input, min) { var n = min - input.length; return "Var god skriv in " + n + (n>1 ? " till tecken" : " tecken till"); }, 12 | formatInputTooLong: function (input, max) { var n = input.length - max; return "Var god sudda ut " + n + " tecken"; }, 13 | formatSelectionTooBig: function (limit) { return "Du kan max välja " + limit + " element"; }, 14 | formatLoadMore: function (pageNumber) { return "Laddar fler resultat…"; }, 15 | formatSearching: function () { return "Söker…"; } 16 | }); 17 | })(jQuery); 18 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Scripts/Select2-locales/select2_locale_th.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Thai translation. 3 | * 4 | * Author: Atsawin Chaowanakritsanakul 5 | */ 6 | (function ($) { 7 | "use strict"; 8 | 9 | $.extend($.fn.select2.defaults, { 10 | formatNoMatches: function () { return "ไม่พบข้อมูล"; }, 11 | formatInputTooShort: function (input, min) { var n = min - input.length; return "โปรดพิมพ์เพิ่มอีก " + n + " ตัวอักษร"; }, 12 | formatInputTooLong: function (input, max) { var n = input.length - max; return "โปรดลบออก " + n + " ตัวอักษร"; }, 13 | formatSelectionTooBig: function (limit) { return "คุณสามารถเลือกได้ไม่เกิน " + limit + " รายการ"; }, 14 | formatLoadMore: function (pageNumber) { return "กำลังค้นข้อมูลเพิ่ม…"; }, 15 | formatSearching: function () { return "กำลังค้นข้อมูล…"; } 16 | }); 17 | })(jQuery); 18 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Scripts/Select2-locales/select2_locale_tr.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Turkish translation. 3 | * 4 | * Author: Salim KAYABAŞI 5 | */ 6 | (function ($) { 7 | "use strict"; 8 | 9 | $.extend($.fn.select2.defaults, { 10 | formatNoMatches: function () { return "Sonuç bulunamadı"; }, 11 | formatInputTooShort: function (input, min) { var n = min - input.length; return "En az " + n + " karakter daha girmelisiniz"; }, 12 | formatInputTooLong: function (input, max) { var n = input.length - max; return n + " karakter azaltmalısınız"; }, 13 | formatSelectionTooBig: function (limit) { return "Sadece " + limit + " seçim yapabilirsiniz"; }, 14 | formatLoadMore: function (pageNumber) { return "Daha fazla…"; }, 15 | formatSearching: function () { return "Aranıyor…"; } 16 | }); 17 | })(jQuery); 18 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Scripts/Select2-locales/select2_locale_vi.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Vietnamese translation. 3 | * 4 | * Author: Long Nguyen 5 | */ 6 | (function ($) { 7 | "use strict"; 8 | 9 | $.extend($.fn.select2.defaults, { 10 | formatNoMatches: function () { return "Không tìm thấy kết quả"; }, 11 | formatInputTooShort: function (input, min) { var n = min - input.length; return "Vui lòng nhập nhiều hơn " + n + " ký tự" + (n == 1 ? "" : "s"); }, 12 | formatInputTooLong: function (input, max) { var n = input.length - max; return "Vui lòng nhập ít hơn " + n + " ký tự" + (n == 1? "" : "s"); }, 13 | formatSelectionTooBig: function (limit) { return "Chỉ có thể chọn được " + limit + " tùy chọn" + (limit == 1 ? "" : "s"); }, 14 | formatLoadMore: function (pageNumber) { return "Đang lấy thêm kết quả…"; }, 15 | formatSearching: function () { return "Đang tìm…"; } 16 | }); 17 | })(jQuery); 18 | 19 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Scripts/Select2-locales/select2_locale_zh-CN.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Chinese translation 3 | */ 4 | (function ($) { 5 | "use strict"; 6 | $.extend($.fn.select2.defaults, { 7 | formatNoMatches: function () { return "没有找到匹配项"; }, 8 | formatInputTooShort: function (input, min) { var n = min - input.length; return "请再输入" + n + "个字符";}, 9 | formatInputTooLong: function (input, max) { var n = input.length - max; return "请删掉" + n + "个字符";}, 10 | formatSelectionTooBig: function (limit) { return "你只能选择最多" + limit + "项"; }, 11 | formatLoadMore: function (pageNumber) { return "加载结果中…"; }, 12 | formatSearching: function () { return "搜索中…"; } 13 | }); 14 | })(jQuery); 15 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Scripts/Select2-locales/select2_locale_zh-TW.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Traditional Chinese translation 3 | */ 4 | (function ($) { 5 | "use strict"; 6 | $.extend($.fn.select2.defaults, { 7 | formatNoMatches: function () { return "沒有找到相符的項目"; }, 8 | formatInputTooShort: function (input, min) { var n = min - input.length; return "請再輸入" + n + "個字元";}, 9 | formatInputTooLong: function (input, max) { var n = input.length - max; return "請刪掉" + n + "個字元";}, 10 | formatSelectionTooBig: function (limit) { return "你只能選擇最多" + limit + "項"; }, 11 | formatLoadMore: function (pageNumber) { return "載入中…"; }, 12 | formatSearching: function () { return "搜尋中…"; } 13 | }); 14 | })(jQuery); 15 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Scripts/_references.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrecisionWebTechnologies/DynamicMVC/a7aac78639c76281e1b1ce00b79ba8f0ee16bdc7/DynamicMVC.UI/Scripts/_references.js -------------------------------------------------------------------------------- /DynamicMVC.UI/Startup.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Owin; 2 | using Owin; 3 | 4 | [assembly: OwinStartupAttribute(typeof(DynamicMVC.UI.Startup))] 5 | namespace DynamicMVC.UI 6 | { 7 | public partial class Startup 8 | { 9 | public void Configuration(IAppBuilder app) 10 | { 11 | ConfigureAuth(app); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Views/Account/ConfirmEmail.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Confirm Email"; 3 | } 4 | 5 |

@ViewBag.Title.

6 |
7 |

8 | Thank you for confirming your email. Please @Html.ActionLink("Click here to Log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" }) 9 |

10 |
11 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Views/Account/ExternalLoginFailure.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Login Failure"; 3 | } 4 | 5 |
6 |

@ViewBag.Title.

7 |

Unsuccessful login with service.

8 |
9 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Views/Account/ForgotPasswordConfirmation.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Forgot Password Confirmation"; 3 | } 4 | 5 |
6 |

@ViewBag.Title.

7 |
8 |
9 |

10 | Please check your email to reset your password. 11 |

12 |
13 | 14 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Views/Account/ResetPasswordConfirmation.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Reset password confirmation"; 3 | } 4 | 5 |
6 |

@ViewBag.Title.

7 |
8 |
9 |

10 | Your password has been reset. Please @Html.ActionLink("click here to log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" }) 11 |

12 |
13 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Views/Account/SendCode.cshtml: -------------------------------------------------------------------------------- 1 | @model DynamicMVC.UI.Models.SendCodeViewModel 2 | @{ 3 | ViewBag.Title = "Send"; 4 | } 5 | 6 |

@ViewBag.Title.

7 | 8 | @using (Html.BeginForm("SendCode", "Account", new { ReturnUrl = Model.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" })) { 9 | @Html.AntiForgeryToken() 10 | @Html.Hidden("rememberMe", @Model.RememberMe) 11 |

Send verification code

12 |
13 |
14 |
15 | Select Two-Factor Authentication Provider: 16 | @Html.DropDownListFor(model => model.SelectedProvider, Model.Providers) 17 | 18 |
19 |
20 | } 21 | 22 | @section Scripts { 23 | @Scripts.Render("~/bundles/jqueryval") 24 | } 25 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Views/Home/About.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "About"; 3 | } 4 |

@ViewBag.Title.

5 |

@ViewBag.Message

6 | 7 |

Use this area to provide additional information.

8 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Views/Home/Contact.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Contact"; 3 | } 4 |

@ViewBag.Title.

5 |

@ViewBag.Message

6 | 7 |
8 | One Microsoft Way
9 | Redmond, WA 98052-6399
10 | P: 11 | 425.555.0100 12 |
13 | 14 |
15 | Support: Support@example.com
16 | Marketing: Marketing@example.com 17 |
-------------------------------------------------------------------------------- /DynamicMVC.UI/Views/Shared/DynamicControls/_DynamicTableHeader.cshtml: -------------------------------------------------------------------------------- 1 | @using DynamicMVC.UI.DynamicMVC.Helpers 2 | @model DynamicMVC.UI.DynamicMVC.ViewModels.DynamicControls.DynamicTableHeaderViewModel 3 | 4 | @if (Model.AllowSort) 5 | { 6 | 7 | @Ajax.DynamicSortNameActionLink(Model.DisplayName, "Index", "_Index", Model.TypeName, Model.RouteValueDictionaryWrapper, new AjaxOptions() { UpdateTargetId = "ajaxtable" }, Model.SortExpression) 8 | 9 | } 10 | else 11 | { 12 | @Model.DisplayName 13 | } 14 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Views/Shared/DynamicControls/_NextDesktopButton.cshtml: -------------------------------------------------------------------------------- 1 | @using DynamicMVC.UI.DynamicMVC.Extensions 2 | @model DynamicMVC.UI.DynamicMVC.ViewModels.DynamicIndexPageViewModel 3 | 4 | @Ajax.ActionLink("Next", "Index", Model.TypeName, Model.RouteValueDictionaryWrapper.CloneAndAddPage(1).GetRouteValueDictionary() 5 | , new AjaxOptions { UpdateTargetId = "ajaxtable", Url = Url.Action("_Index", Model.TypeName, Model.RouteValueDictionaryWrapper.CloneAndAddPage(1).GetRouteValueDictionary()) } 6 | , new { @id = "desktopNextLink" }) 7 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Views/Shared/DynamicControls/_NextMobileButton.cshtml: -------------------------------------------------------------------------------- 1 | @using DynamicMVC.UI.DynamicMVC.Extensions 2 | @model DynamicMVC.UI.DynamicMVC.ViewModels.DynamicIndexViewModel 3 | 4 | @Ajax.ActionLink("Next", "Index", Model.TypeName, Model.RouteValueDictionaryWrapper.CloneAndAddPage(1).GetRouteValueDictionary() 5 | , new AjaxOptions { UpdateTargetId = "ajaxtable", Url = Url.Action("_Index", Model.TypeName, Model.RouteValueDictionaryWrapper.CloneAndAddPage(1).GetRouteValueDictionary()) } 6 | , new { @class = "btn btn-primary pull-right", @style = "vertical-align: bottom;", @id = "mobileNext" }) 7 | 8 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Views/Shared/DynamicControls/_PreviousDesktopButton.cshtml: -------------------------------------------------------------------------------- 1 | @using DynamicMVC.UI.DynamicMVC.Extensions 2 | @model DynamicMVC.UI.DynamicMVC.ViewModels.DynamicIndexPageViewModel 3 | 4 | @Ajax.ActionLink("Previous", "Index", Model.TypeName, Model.RouteValueDictionaryWrapper.CloneAndAddPage(-1).GetRouteValueDictionary() 5 | , new AjaxOptions { UpdateTargetId = "ajaxtable", Url = Url.Action("_Index", Model.TypeName, Model.RouteValueDictionaryWrapper.CloneAndAddPage(-1).GetRouteValueDictionary()) } 6 | , new { @id = "desktopPreviousLink" }) 7 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Views/Shared/DynamicControls/_PreviousMobileButton.cshtml: -------------------------------------------------------------------------------- 1 | @using DynamicMVC.UI.DynamicMVC.Extensions 2 | @model DynamicMVC.UI.DynamicMVC.ViewModels.DynamicIndexViewModel 3 | 4 | @Ajax.ActionLink("Previous", "Index", Model.TypeName, Model.RouteValueDictionaryWrapper.CloneAndAddPage(-1).GetRouteValueDictionary() 5 | , new AjaxOptions { UpdateTargetId = "ajaxtable", Url = Url.Action("_Index", Model.TypeName, Model.RouteValueDictionaryWrapper.CloneAndAddPage(-1).GetRouteValueDictionary()) } 6 | , new { @class = "btn btn-primary", @style = "margin-top: 20px;", @id = "mobilePrevious" }) 7 | 8 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Views/Shared/DynamicDelete.cshtml: -------------------------------------------------------------------------------- 1 | @model DynamicMVC.UI.DynamicMVC.ViewModels.DynamicDeleteViewModel 2 | 3 |
4 |
5 |

@Model.Header

6 |
7 |
8 | 9 |
10 | @using (Html.BeginForm("Delete", Model.TypeName, new { ReturnUrl = Model.ReturnUrl }, FormMethod.Post, new { role = "form", @class = "form-horizontal" })) 11 | { 12 | @Html.AntiForgeryToken() 13 | @Html.Hidden("Id") 14 |

Are you sure you want to delete this?

15 | 16 |
17 | 18 |
19 | } 20 |
-------------------------------------------------------------------------------- /DynamicMVC.UI/Views/Shared/DynamicDetails.cshtml: -------------------------------------------------------------------------------- 1 | @using DynamicMVC.UI.DynamicMVC.Helpers 2 | @model DynamicMVC.UI.DynamicMVC.ViewModels.DynamicDetailsViewModel 3 | 4 | @{ 5 | ViewBag.Title = Model.Title; 6 | } 7 | 8 |
9 |
10 |

@Model.Header

11 |
12 |
13 | 14 |
15 | @using (Html.BeginForm("Details", Model.TypeName, null, FormMethod.Post, new { role = "form", @class = "form-horizontal" })) 16 | { 17 | @Html.Partial("DynamicControls/_DisplayMessage", false) 18 | @Html.AntiForgeryToken() 19 | @Html.ValidationSummary(false) 20 | @Html.Hidden("Id") 21 | foreach (var dynamicPropertyViewModel in Model.DynamicEditorViewModels) 22 | { 23 | @Html.DynamicEditor(dynamicPropertyViewModel) 24 | } 25 | @Html.Partial("Partials/_DynamicUIMethods", Model.DynamicUIMethods) 26 | } 27 |
28 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Views/Shared/DynamicDisplayPartials/_DynamicDisplay.cshtml: -------------------------------------------------------------------------------- 1 | @using DynamicMVC.UI.DynamicMVC.ViewModels.DynamicPropertyViewModels 2 | @{ 3 | var dynamicPropertyViewModel = (DynamicPropertyIndexViewModel)ViewData["DynamicPropertyViewModel"]; 4 | } 5 | 6 | @Html.Display(dynamicPropertyViewModel.PropertyName) 7 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Views/Shared/DynamicDisplayPartials/_DynamicDisplayHyperlink.cshtml: -------------------------------------------------------------------------------- 1 | @using DynamicMVC.UI.DynamicMVC.ViewModels.DynamicPropertyViewModels 2 | 3 | @{ 4 | var dynamicPropertyViewModel = (DynamicPropertyIndexViewModel)ViewData["DynamicPropertyViewModel"]; 5 | var dynamicHyperlinkViewModel = dynamicPropertyViewModel.DynamicEditorHyperlinkViewModel; 6 | var showHyperLink = dynamicHyperlinkViewModel != null; 7 | } 8 | @if (showHyperLink) 9 | { 10 | @Html.ActionLink(dynamicHyperlinkViewModel.DisplayName, dynamicHyperlinkViewModel.ActionName, dynamicHyperlinkViewModel.ControllerName, dynamicHyperlinkViewModel.RouteValueDictionaryWrapper.GetRouteValueDictionary(), null) 11 | } 12 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Views/Shared/DynamicFilters/DynamicFilterAutoComplete.cshtml: -------------------------------------------------------------------------------- 1 | @model DynamicMVC.UI.DynamicMVC.ViewModels.DynamicFilterViewModels.DynamicFilterAutoCompleteViewModel 2 | 3 |
4 | @Html.Label(Model.QueryStringName, Model.LabelText) 5 |
6 | @Html.TextBox(Model.QueryStringName, Model.FilterValue, new { @class = "autocomplete", @style = "width : 175px;", data_url = @Url.Action("AutoCompleteCustom", Model.Type.Name, new { valueMember = Model.ValueMember, displayMember = Model.DisplayMember}), data_default = Model.FilterText, data_id = Model.QueryStringName }) 7 | @Html.ValidationMessage(Model.QueryStringName) 8 |
9 |
10 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Views/Shared/DynamicFilters/DynamicFilterBoolean.cshtml: -------------------------------------------------------------------------------- 1 | @model DynamicMVC.UI.DynamicMVC.ViewModels.DynamicFilterViewModels.DynamicFilterBooleanViewModel 2 | 3 |
4 | @Html.Label(Model.QueryStringName, Model.LabelText) 5 |
6 | @Html.DropDownList(Model.QueryStringName, Model.SelectList, new { @class = "form-control", @style = "width : 175px;" }) 7 | @Html.ValidationMessage(Model.QueryStringName) 8 |
9 |
10 | 11 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Views/Shared/DynamicFilters/DynamicFilterContainsTextBox.cshtml: -------------------------------------------------------------------------------- 1 | @model DynamicMVC.UI.DynamicMVC.ViewModels.DynamicFilterViewModels.DynamicFilterContainsTextBoxViewModel 2 | 3 |
4 | @Html.Label(Model.QueryStringName, Model.LabelText) 5 |
6 | @Html.TextBox(Model.QueryStringName, Model.FilterValue, new { @class = "form-control", @style = "width : 175px;" }) 7 | @Html.ValidationMessage(Model.QueryStringName) 8 |
9 |
10 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Views/Shared/DynamicFilters/DynamicFilterDateRange.cshtml: -------------------------------------------------------------------------------- 1 | @model DynamicMVC.UI.DynamicMVC.ViewModels.DynamicFilterViewModels.DynamicFilterDateRangeViewModel 2 | 3 |
4 | @Html.Label(Model.StartQueryStringName, Model.StartLabelText) 5 |
6 | @Html.TextBox(Model.StartQueryStringName, Model.StartFilterValue, new { @class = "datepicker form-control", @style = "width : 175px;" }) 7 | @Html.ValidationMessage(Model.StartQueryStringName) 8 |
9 |
10 |
11 | @Html.Label(Model.EndQueryStringName, Model.EndLabelText) 12 |
13 | @Html.TextBox(Model.EndQueryStringName, Model.EndFilterValue, new { @class = "datepicker form-control", @style = "width : 175px;" }) 14 | @Html.ValidationMessage(Model.EndQueryStringName) 15 |
16 |
-------------------------------------------------------------------------------- /DynamicMVC.UI/Views/Shared/DynamicFilters/DynamicFilterDateTime.cshtml: -------------------------------------------------------------------------------- 1 | @model DynamicMVC.UI.DynamicMVC.ViewModels.DynamicFilterViewModels.DynamicFilterDateTimeViewModel 2 | 3 |
4 | @Html.Label(Model.QueryStringName, Model.LabelText) 5 |
6 | @Html.TextBox(Model.QueryStringName, Model.FilterValue, new { @class = "datepicker form-control", @style = "width : 175px;" }) 7 | @Html.ValidationMessage(Model.QueryStringName) 8 |
9 |
10 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Views/Shared/DynamicFilters/DynamicFilterDropDown.cshtml: -------------------------------------------------------------------------------- 1 | @model DynamicMVC.UI.DynamicMVC.ViewModels.DynamicFilterViewModels.DynamicFilterDropDownViewModel 2 | 3 |
4 | @Html.Label(Model.PropertyName, Model.LabelText) 5 |
6 | @Html.DropDownList(Model.PropertyName, Model.SelectList, new { @class = "form-control" }) 7 | @Html.ValidationMessage(Model.PropertyName) 8 |
9 |
10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Views/Shared/DynamicFilters/DynamicFilterExactMatchTextBox.cshtml: -------------------------------------------------------------------------------- 1 | @model DynamicMVC.UI.DynamicMVC.ViewModels.DynamicFilterViewModels.DynamicFilterExactMatchTextBoxViewModel 2 | 3 |
4 | @Html.Label(Model.QueryStringName, Model.LabelText) 5 |
6 | @Html.TextBox(Model.QueryStringName, Model.FilterValue, new { @class = "form-control", @style = "width : 175px;" }) 7 | @Html.ValidationMessage(Model.QueryStringName) 8 |
9 |
10 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Views/Shared/EditorTemplates/DynamicEditor.cshtml: -------------------------------------------------------------------------------- 1 | @model object 2 | 3 |
4 | @Html.LabelFor(m => m) 5 |
6 | @Html.TextBoxFor(m => m, new {@class = "form-control"}) 7 |
8 |
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Views/Shared/EditorTemplates/DynamicEditorBool.cshtml: -------------------------------------------------------------------------------- 1 | @model Boolean 2 | 3 |
4 | @Html.LabelFor(m => m) 5 |
6 | @Html.CheckBoxFor(m => m, new { @class = "form-control", @style = "width:28px;" }) 7 |
8 |
9 | 10 | 11 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Views/Shared/EditorTemplates/DynamicEditorBoolNullable.cshtml: -------------------------------------------------------------------------------- 1 | @model bool? 2 | 3 | @{ 4 | var selectList = new List(); 5 | selectList.Add(new SelectListItem(){Selected = Model == null,Text = "Not Set",Value = ""}); 6 | selectList.Add(new SelectListItem() { Selected = Model == true, Text = "True", Value = "true" }); 7 | selectList.Add(new SelectListItem() { Selected = Model == false, Text = "False", Value = "false" }); 8 | } 9 |
10 | @Html.LabelFor(m => m) 11 |
12 | @Html.DropDownListFor(m=>m, selectList, new {@class = "form-control"}) 13 |
14 |
15 | 16 | 17 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Views/Shared/EditorTemplates/DynamicEditorDateTime.cshtml: -------------------------------------------------------------------------------- 1 | @model object 2 | 3 |
4 | @Html.LabelFor(m => m) 5 |
6 | @Html.TextBoxFor(m => m, new { @class = "form-control datepicker" }) 7 |
8 |
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Views/Shared/EditorTemplates/DynamicEditorDropDown.cshtml: -------------------------------------------------------------------------------- 1 | @using DynamicMVC.UI.DynamicMVC 2 | @using DynamicMVC.UI.DynamicMVC.Helpers 3 | @using DynamicMVC.UI.DynamicMVC.ViewModels.DynamicPropertyViewModels 4 | 5 | @model object 6 | 7 | @{ 8 | var dynamicPropertyEditorViewModel = (DynamicPropertyEditorViewModel)ViewData["DynamicPropertyEditorViewModel"]; 9 | var dynamicEditorDropDownViewModel = dynamicPropertyEditorViewModel.DynamicEditorDropDownViewModel; 10 | } 11 | 12 |
13 | @Html.DynamicLabelFor(m => m, dynamicPropertyEditorViewModel) 14 |
15 | @Html.DropDownListFor(m => m, dynamicEditorDropDownViewModel.SelectListItems, new { @class = "form-control" }) 16 |
17 |
18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Views/Shared/EditorTemplates/DynamicEditorHidden.cshtml: -------------------------------------------------------------------------------- 1 | @model object 2 | 3 | @Html.HiddenFor(m => m) -------------------------------------------------------------------------------- /DynamicMVC.UI/Views/Shared/EditorTemplates/DynamicEditorMultiLine.cshtml: -------------------------------------------------------------------------------- 1 | @model object 2 | 3 |
4 | @Html.LabelFor(m => m) 5 |
6 | @Html.TextAreaFor(m => m, new { @class = "form-control", rows = 5 }) 7 |
8 |
9 | 10 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Views/Shared/EditorTemplates/DynamicEditorMultiLineReadonly.cshtml: -------------------------------------------------------------------------------- 1 | @model object 2 | 3 |
4 | @Html.LabelFor(m => m) 5 |
6 | @Html.TextAreaFor(m => m, new { @class = "form-control", rows = 5, @readonly = "readonly" }) 7 |
8 |
9 | 10 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Views/Shared/EditorTemplates/DynamicEditorPassword.cshtml: -------------------------------------------------------------------------------- 1 | @model object 2 | 3 |
4 | @Html.LabelFor(m => m) 5 |
6 | @Html.PasswordFor(m => m, new {@class = "form-control"}) 7 |
8 |
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Views/Shared/EditorTemplates/DynamicEditorReadOnly.cshtml: -------------------------------------------------------------------------------- 1 | @using DynamicMVC.UI.DynamicMVC.ViewModels.DynamicPropertyViewModels 2 | @model object 3 | @{ 4 | var dynamicPropertyViewModel = (DynamicPropertyEditorViewModel)ViewData["DynamicPropertyEditorViewModel"]; 5 | } 6 |
7 | @Html.LabelFor(m => m) 8 |
9 | @Html.TextBoxFor(m => m, new { @class = "form-control", @readonly = "readonly" }) 10 |
11 |
12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Views/Shared/Error.cshtml: -------------------------------------------------------------------------------- 1 | @model System.Web.Mvc.HandleErrorInfo 2 | 3 | @{ 4 | ViewBag.Title = "Error"; 5 | } 6 | 7 |

Error.

8 |

An error occurred while processing your request.

9 | 10 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Views/Shared/Lockout.cshtml: -------------------------------------------------------------------------------- 1 | @model System.Web.Mvc.HandleErrorInfo 2 | 3 | @{ 4 | ViewBag.Title = "Locked Out"; 5 | } 6 | 7 |
8 |

Locked out.

9 |

This account has been locked out, please try again later.

10 |
11 | -------------------------------------------------------------------------------- /DynamicMVC.UI/Views/Shared/Partials/_DynamicIndexHeader.cshtml: -------------------------------------------------------------------------------- 1 | @model DynamicMVC.UI.DynamicMVC.ViewModels.DynamicIndexPageViewModel 2 | 3 | @if (Model.ShowDelete) 4 | { 5 | 6 | } 7 | @if (Model.ShowEdit) 8 | { 9 | 10 | } 11 | @if (Model.ShowDetails) 12 | { 13 | 14 | } 15 | 16 | @foreach (var item in Model.DynamicTableHeaderViewModels) 17 | { 18 | @Html.Partial("DynamicControls/_DynamicTableHeader", item); 19 | } -------------------------------------------------------------------------------- /DynamicMVC.UI/Views/Shared/Partials/_DynamicUIMethods.cshtml: -------------------------------------------------------------------------------- 1 | @model IEnumerable 2 | 3 | @foreach (var method in Model) 4 | { 5 | 6 | } -------------------------------------------------------------------------------- /DynamicMVC.UI/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "~/Views/Shared/_Layout.cshtml"; 3 | } 4 | -------------------------------------------------------------------------------- /DynamicMVC.UI/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrecisionWebTechnologies/DynamicMVC/a7aac78639c76281e1b1ce00b79ba8f0ee16bdc7/DynamicMVC.UI/favicon.ico -------------------------------------------------------------------------------- /DynamicMVC.UI/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrecisionWebTechnologies/DynamicMVC/a7aac78639c76281e1b1ce00b79ba8f0ee16bdc7/DynamicMVC.UI/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /DynamicMVC.UI/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrecisionWebTechnologies/DynamicMVC/a7aac78639c76281e1b1ce00b79ba8f0ee16bdc7/DynamicMVC.UI/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /DynamicMVC.UI/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrecisionWebTechnologies/DynamicMVC/a7aac78639c76281e1b1ce00b79ba8f0ee16bdc7/DynamicMVC.UI/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /NuGet.Packager/NuGet.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /NuGet.Packager/NuGet.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrecisionWebTechnologies/DynamicMVC/a7aac78639c76281e1b1ce00b79ba8f0ee16bdc7/NuGet.Packager/NuGet.exe -------------------------------------------------------------------------------- /NuGet.Packager/content/DynamicMVC/CorrectQueryStringTypesActionFilter.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Mvc; 2 | using DynamicMVC.UI.Controllers; 3 | 4 | namespace DynamicMVC.UI.DynamicMVC 5 | { 6 | public class CorrectQueryStringTypesActionFilter : ActionFilterAttribute 7 | { 8 | public override void OnActionExecuting(ActionExecutingContext filterContext) 9 | { 10 | base.OnActionExecuting(filterContext); 11 | var dynamicController = (DynamicControllerBase) filterContext.Controller; 12 | dynamicController.CorrectQueryStringTypes(); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /NuGet.Packager/content/DynamicMVC/DynamicMVCContextOptions.cs: -------------------------------------------------------------------------------- 1 | namespace DynamicMVC.UI.DynamicMVC 2 | { 3 | public class DynamicMVCContextOptions 4 | { 5 | public DynamicMVCContextOptions() 6 | { 7 | DynamicDropDownRecordLimit = 50; 8 | } 9 | 10 | public long DynamicDropDownRecordLimit { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /NuGet.Packager/content/DynamicMVC/Interfaces/IDynamicCreateViewModelBuilder.cs: -------------------------------------------------------------------------------- 1 | using DynamicMVC.DynamicEntityMetadataLibrary.Models; 2 | using DynamicMVC.UI.DynamicMVC.ViewModels; 3 | 4 | namespace DynamicMVC.UI.DynamicMVC.Interfaces 5 | { 6 | public interface IDynamicCreateViewModelBuilder 7 | { 8 | DynamicCreateViewModel Build(DynamicEntityMetadata dynamicEntityMetadata, dynamic createModel, string returnUrl); 9 | } 10 | } -------------------------------------------------------------------------------- /NuGet.Packager/content/DynamicMVC/Interfaces/IDynamicDeleteViewModelBuilder.cs: -------------------------------------------------------------------------------- 1 | using DynamicMVC.DynamicEntityMetadataLibrary.Models; 2 | using DynamicMVC.UI.DynamicMVC.ViewModels; 3 | 4 | namespace DynamicMVC.UI.DynamicMVC.Interfaces 5 | { 6 | public interface IDynamicDeleteViewModelBuilder 7 | { 8 | DynamicDeleteViewModel Build(DynamicEntityMetadata dynamicEntityMetadata, dynamic deleteModel, string returnUrl); 9 | } 10 | } -------------------------------------------------------------------------------- /NuGet.Packager/content/DynamicMVC/Interfaces/IDynamicDetailsViewModelBuilder.cs: -------------------------------------------------------------------------------- 1 | using DynamicMVC.DynamicEntityMetadataLibrary.Models; 2 | using DynamicMVC.UI.DynamicMVC.ViewModels; 3 | 4 | namespace DynamicMVC.UI.DynamicMVC.Interfaces 5 | { 6 | public interface IDynamicDetailsViewModelBuilder 7 | { 8 | DynamicDetailsViewModel Build(DynamicEntityMetadata dynamicEntityMetadata, dynamic detailModel); 9 | } 10 | } -------------------------------------------------------------------------------- /NuGet.Packager/content/DynamicMVC/Interfaces/IDynamicDisplayName.cs: -------------------------------------------------------------------------------- 1 | #pragma warning disable 1591 2 | namespace DynamicMVC.UI.DynamicMVC.Interfaces 3 | { 4 | public interface IDynamicDisplayName 5 | { 6 | string DisplayName { get; set; } 7 | string ViewModelPropertyName { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /NuGet.Packager/content/DynamicMVC/Interfaces/IDynamicDisplayPartialModelBuilder.cs: -------------------------------------------------------------------------------- 1 | using DynamicMVC.DynamicEntityMetadataLibrary.Models; 2 | using DynamicMVC.UI.DynamicMVC.ViewModels.DynamicPropertyViewModels; 3 | 4 | namespace DynamicMVC.UI.DynamicMVC.Interfaces 5 | { 6 | public interface IDynamicDisplayPartialModelBuilder 7 | { 8 | string DynamicDisplayPartialName(); 9 | void Build(DynamicPropertyMetadata dynamicPropertyMetadata, DynamicPropertyIndexViewModel dynamicPropertyIndexViewModel, dynamic item); 10 | } 11 | } -------------------------------------------------------------------------------- /NuGet.Packager/content/DynamicMVC/Interfaces/IDynamicEditViewModelBuilder.cs: -------------------------------------------------------------------------------- 1 | using DynamicMVC.DynamicEntityMetadataLibrary.Models; 2 | using DynamicMVC.UI.DynamicMVC.ViewModels; 3 | 4 | namespace DynamicMVC.UI.DynamicMVC.Interfaces 5 | { 6 | public interface IDynamicEditViewModelBuilder 7 | { 8 | DynamicEditViewModel Build(DynamicEntityMetadata dynamicEntityMetadata, dynamic editModel, string returnUrl); 9 | } 10 | } -------------------------------------------------------------------------------- /NuGet.Packager/content/DynamicMVC/Interfaces/IDynamicEditorModelBuilder.cs: -------------------------------------------------------------------------------- 1 | using DynamicMVC.DynamicEntityMetadataLibrary.Models; 2 | using DynamicMVC.UI.DynamicMVC.ViewModels.DynamicPropertyViewModels; 3 | 4 | namespace DynamicMVC.UI.DynamicMVC.Interfaces 5 | { 6 | public interface IDynamicEditorModelBuilder 7 | { 8 | string DynamicEditorName(); 9 | void Build(DynamicPropertyMetadata dynamicPropertyMetadata, DynamicPropertyEditorViewModel dynamicPropertyViewModel, dynamic item); 10 | } 11 | } -------------------------------------------------------------------------------- /NuGet.Packager/content/DynamicMVC/Interfaces/IDynamicEntitySearchManager.cs: -------------------------------------------------------------------------------- 1 | using DynamicMVC.DynamicEntityMetadataLibrary.Models; 2 | 3 | namespace DynamicMVC.UI.DynamicMVC.Interfaces 4 | { 5 | public interface IDynamicEntitySearchManager 6 | { 7 | DynamicEntityMetadata DynamicEntityMetadata { get; } 8 | } 9 | } -------------------------------------------------------------------------------- /NuGet.Packager/content/DynamicMVC/Interfaces/IDynamicFilter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using DynamicMVC.DynamicEntityMetadataLibrary.Models; 4 | 5 | namespace DynamicMVC.UI.DynamicMVC.Interfaces 6 | { 7 | public interface IDynamicFilter 8 | { 9 | IQueryable Filter(IQueryable qry); 10 | void ViewModelCreated(DynamicPropertyMetadata dynamicPropertyMetadata, IDictionary controlParameters); 11 | string PropertyName { get; set; } 12 | RouteValueDictionaryWrapper RouteValueDictionaryWrapper { get; set; } 13 | int Order { get; set; } 14 | string QueryStringName { get; set; } 15 | string DynamicFilterViewName(); 16 | bool FilterIsApplied(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /NuGet.Packager/content/DynamicMVC/Interfaces/IDynamicFilterFactory.cs: -------------------------------------------------------------------------------- 1 | using DynamicMVC.Annotations; 2 | using DynamicMVC.DynamicEntityMetadataLibrary.Models; 3 | 4 | namespace DynamicMVC.UI.DynamicMVC.Interfaces 5 | { 6 | public interface IDynamicFilterFactory 7 | { 8 | IDynamicFilter GetDynamicFilter(string dynamicFilterViewName, DynamicPropertyMetadata dynamicPropertyMetadata, RouteValueDictionaryWrapper routeValueDictionaryWrapper); 9 | IDynamicFilter GetDynamicFilter(DynamicFilterUIHintAttribute dynamicFilterUIHintAttribute, DynamicPropertyMetadata dynamicPropertyMetadata, RouteValueDictionaryWrapper routeValueDictionaryWrapper); 10 | 11 | } 12 | } -------------------------------------------------------------------------------- /NuGet.Packager/content/DynamicMVC/Interfaces/IDynamicFilterManager.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using DynamicMVC.DynamicEntityMetadataLibrary.Models; 3 | using DynamicMVC.UI.DynamicMVC.ViewModels.DynamicPropertyViewModels; 4 | 5 | namespace DynamicMVC.UI.DynamicMVC.Interfaces 6 | { 7 | public interface IDynamicFilterManager 8 | { 9 | IEnumerable GetFilterPropertyViewModels(DynamicEntityMetadata dynamicEntityMetadata, RouteValueDictionaryWrapper routeValueDictionaryWrapper); 10 | string GetFilterMessage(DynamicEntityMetadata dynamicEntityMetadata, RouteValueDictionaryWrapper routeValueDictionaryWrapper); 11 | IEnumerable GetDynamicFilters(DynamicEntityMetadata dynamicEntityMetadata, RouteValueDictionaryWrapper routeValueDictionaryWrapper); 12 | } 13 | } -------------------------------------------------------------------------------- /NuGet.Packager/content/DynamicMVC/Interfaces/IDynamicIndexPageViewModelBuilder.cs: -------------------------------------------------------------------------------- 1 | using DynamicMVC.DynamicEntityMetadataLibrary.Models; 2 | using DynamicMVC.UI.DynamicMVC.ViewModels; 3 | 4 | namespace DynamicMVC.UI.DynamicMVC.Interfaces 5 | { 6 | public interface IDynamicIndexPageViewModelBuilder 7 | { 8 | DynamicIndexPageViewModel Build(DynamicEntityMetadata dynamicEntityMetadata); 9 | } 10 | } -------------------------------------------------------------------------------- /NuGet.Packager/content/DynamicMVC/Interfaces/IDynamicIndexViewModelBuilder.cs: -------------------------------------------------------------------------------- 1 | using DynamicMVC.DynamicEntityMetadataLibrary.Models; 2 | using DynamicMVC.UI.DynamicMVC.ViewModels; 3 | 4 | namespace DynamicMVC.UI.DynamicMVC.Interfaces 5 | { 6 | public interface IDynamicIndexViewModelBuilder 7 | { 8 | DynamicIndexViewModel Build(DynamicEntityMetadata dynamicEntityMetadata); 9 | } 10 | } -------------------------------------------------------------------------------- /NuGet.Packager/content/DynamicMVC/Interfaces/IDynamicPropertyViewModelBuilder.cs: -------------------------------------------------------------------------------- 1 | using DynamicMVC.DynamicEntityMetadataLibrary.Models; 2 | using DynamicMVC.UI.DynamicMVC.ViewModels.DynamicPropertyViewModels; 3 | 4 | namespace DynamicMVC.UI.DynamicMVC.Interfaces 5 | { 6 | public interface IDynamicPropertyViewModelBuilder 7 | { 8 | DynamicPropertyIndexViewModel BuildDynamicPropertyIndexViewModel(DynamicPropertyMetadata dynamicPropertyMetadata); 9 | DynamicPropertyEditorViewModel BuildDynamicPropertyEditorViewModelForEdit(DynamicPropertyMetadata dynamicPropertyMetadata); 10 | DynamicPropertyEditorViewModel BuildDynamicPropertyEditorViewModelForCreate(DynamicPropertyMetadata dynamicPropertyMetadata); 11 | DynamicPropertyEditorViewModel BuildDynamicPropertyEditorViewModelForDetails(DynamicPropertyMetadata dynamicPropertyMetadata); 12 | } 13 | } -------------------------------------------------------------------------------- /NuGet.Packager/content/DynamicMVC/Interfaces/IRequestManager.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Web.Routing; 3 | using DynamicMVC.DynamicEntityMetadataLibrary.Models; 4 | 5 | namespace DynamicMVC.UI.DynamicMVC.Interfaces 6 | { 7 | public interface IRequestManager 8 | { 9 | IDictionary RouteDataDictionary { get; set; } 10 | RouteValueDictionaryWrapper QueryStringDictionary { get; set; } 11 | void CorrectQuerystringTypes(DynamicEntityMetadata dynamicEntityMetadata); 12 | bool PagingParametersDoNotExist(); 13 | void AddPagingParameters(string defaultOrderBy, int page, int pageSize, string keyName); 14 | RouteValueDictionaryWrapper RouteValueDictionaryWrapper(); 15 | string OrderBy(); 16 | string ViewProperties(); 17 | } 18 | } -------------------------------------------------------------------------------- /NuGet.Packager/content/DynamicMVC/Interfaces/ISelectListItemManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Web.Mvc; 4 | 5 | namespace DynamicMVC.UI.DynamicMVC.Interfaces 6 | { 7 | public interface ISelectListItemManager 8 | { 9 | List GetSelectListItems(Type type, string valueFieldName, string textFieldName, object selectedItem = null, string nullText = null); 10 | List GetSelectListItemForBooleanDropDown(bool? value, string nullText); 11 | } 12 | } -------------------------------------------------------------------------------- /NuGet.Packager/content/DynamicMVC/Interfaces/IUrlManager.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Mvc; 2 | 3 | namespace DynamicMVC.UI.DynamicMVC.Interfaces 4 | { 5 | public interface IUrlManager 6 | { 7 | UrlHelper Url { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /NuGet.Packager/content/DynamicMVC/Managers/UrlManager.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | using System.Web.Mvc; 3 | using System.Web.Routing; 4 | using DynamicMVC.UI.DynamicMVC.Interfaces; 5 | 6 | namespace DynamicMVC.UI.DynamicMVC.Managers 7 | { 8 | public class UrlManager : IUrlManager 9 | { 10 | public UrlManager() 11 | { 12 | Url = new UrlHelper(HttpContext.Current.Request.RequestContext, RouteTable.Routes); 13 | } 14 | 15 | public UrlHelper Url { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /NuGet.Packager/content/DynamicMVC/ViewModelBuilders/DynamicDeleteViewModelBuilder.cs: -------------------------------------------------------------------------------- 1 | using DynamicMVC.DynamicEntityMetadataLibrary.Models; 2 | using DynamicMVC.UI.DynamicMVC.Interfaces; 3 | using DynamicMVC.UI.DynamicMVC.ViewModels; 4 | 5 | namespace DynamicMVC.UI.DynamicMVC.ViewModelBuilders 6 | { 7 | public class DynamicDeleteViewModelBuilder : IDynamicDeleteViewModelBuilder 8 | { 9 | public DynamicDeleteViewModel Build(DynamicEntityMetadata dynamicEntityMetadata, dynamic deleteModel, string returnUrl) 10 | { 11 | var dynamicDeleteViewModel = new DynamicDeleteViewModel(); 12 | dynamicDeleteViewModel.TypeName = dynamicEntityMetadata.TypeName; 13 | dynamicDeleteViewModel.Header = "Delete " + dynamicEntityMetadata.TypeName; 14 | dynamicDeleteViewModel.ReturnUrl = returnUrl; 15 | return dynamicDeleteViewModel; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /NuGet.Packager/content/DynamicMVC/ViewModels/DynamicControls/DynamicEditorViewModel.cs: -------------------------------------------------------------------------------- 1 | using DynamicMVC.UI.DynamicMVC.ViewModels.DynamicPropertyViewModels; 2 | 3 | namespace DynamicMVC.UI.DynamicMVC.ViewModels.DynamicControls 4 | { 5 | public class DynamicEditorViewModel 6 | { 7 | public string ViewModelPropertyName { get; set; } 8 | public string DynamicEditorName { get; set; } 9 | public DynamicPropertyEditorViewModel DynamicPropertyEditorViewModel { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /NuGet.Packager/content/DynamicMVC/ViewModels/DynamicControls/MessageViewModel.cs: -------------------------------------------------------------------------------- 1 | using DynamicMVC.Shared.Enums; 2 | 3 | namespace DatabaseManagerMVC.UI.DynamicMVC.ViewModels.DynamicControls 4 | { 5 | public class MessageViewModel 6 | { 7 | public MessageViewModel() 8 | { 9 | MessageTypeEnum = MessageTypeEnum.Success; 10 | } 11 | 12 | public MessageViewModel(string message) 13 | { 14 | Message = message; 15 | } 16 | 17 | public MessageViewModel(MessageTypeEnum messageTypeEnum, string message): this(message) 18 | { 19 | MessageTypeEnum = messageTypeEnum; 20 | } 21 | 22 | public MessageTypeEnum MessageTypeEnum { get; set; } 23 | public string Message { get; set; } 24 | } 25 | } -------------------------------------------------------------------------------- /NuGet.Packager/content/DynamicMVC/ViewModels/DynamicDeleteViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace DynamicMVC.UI.DynamicMVC.ViewModels 2 | { 3 | public class DynamicDeleteViewModel 4 | { 5 | public DynamicDeleteViewModel() 6 | { 7 | ButtonText = "Delete"; 8 | } 9 | 10 | public string Header { get; set; } 11 | public string TypeName { get; set; } 12 | public string ButtonText { get; set; } 13 | public string ReturnUrl { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /NuGet.Packager/content/DynamicMVC/ViewModels/DynamicEditorViewModels/DynamicEditorAutoCompleteViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace DynamicMVC.UI.DynamicMVC.ViewModels.DynamicEditorViewModels 2 | { 3 | /// 4 | /// 5 | /// 6 | public class DynamicEditorAutoCompleteViewModel 7 | { 8 | public string TypeName { get; set; } 9 | public string SelectedText { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /NuGet.Packager/content/DynamicMVC/ViewModels/DynamicEditorViewModels/DynamicEditorDropDownViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Web.Mvc; 4 | 5 | namespace DynamicMVC.UI.DynamicMVC.ViewModels.DynamicEditorViewModels 6 | { 7 | public class DynamicEditorDropDownViewModel 8 | { 9 | public DynamicEditorDropDownViewModel() 10 | { 11 | 12 | } 13 | 14 | public DynamicEditorDropDownViewModel(Type type, string dataTextField, string dataValueField) 15 | : this() 16 | { 17 | Type = type; 18 | DataTextField = dataTextField; 19 | DataValueField = dataValueField; 20 | } 21 | public Type Type { get; set; } 22 | public string DataTextField { get; set; } 23 | public string DataValueField { get; set; } 24 | public List SelectListItems { get; set; } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /NuGet.Packager/content/DynamicMVC/ViewModels/DynamicIndexItemViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Web.Routing; 3 | using DynamicMVC.UI.DynamicMVC.ViewModels.DynamicPropertyViewModels; 4 | 5 | namespace DynamicMVC.UI.DynamicMVC.ViewModels 6 | { 7 | public class DynamicIndexItemViewModel 8 | { 9 | public DynamicIndexItemViewModel() 10 | { 11 | DynamicPropertyIndexViewModels = new List(); 12 | } 13 | 14 | public bool ShowDelete { get; set; } 15 | public bool ShowEdit { get; set; } 16 | public bool ShowDetails { get; set; } 17 | public dynamic Item { get; set; } 18 | public string TypeName { get; set; } 19 | public RouteValueDictionaryWrapper RouteValueDictionaryWrapper { get; set; } 20 | 21 | public List DynamicPropertyIndexViewModels { get; set; } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /NuGet.Packager/content/DynamicMVC/ViewModels/DynamicIndexViewModel.cs: -------------------------------------------------------------------------------- 1 | using DynamicMVC.UI.DynamicMVC.ViewModels.Partials; 2 | 3 | namespace DynamicMVC.UI.DynamicMVC.ViewModels 4 | { 5 | public class DynamicIndexViewModel 6 | { 7 | public DynamicIndexViewModel() 8 | { 9 | Title = "Index"; 10 | } 11 | 12 | public string Title { get; set; } 13 | public string Header { get; set; } 14 | public string TypeName { get; set; } 15 | public string FilterMessage { get; set; } 16 | public RouteValueDictionaryWrapper RouteValueDictionaryWrapper { get; set; } 17 | 18 | public DynamicIndexFiltersViewModel DynamicIndexFiltersViewModel { get; set; } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /NuGet.Packager/content/DynamicMVC/ViewModels/DynamicPropertyViewModels/DynamicFilterViewModel.cs: -------------------------------------------------------------------------------- 1 | using DynamicMVC.DynamicEntityMetadataLibrary.Models; 2 | using DynamicMVC.UI.DynamicMVC.Interfaces; 3 | 4 | namespace DynamicMVC.UI.DynamicMVC.ViewModels.DynamicPropertyViewModels 5 | { 6 | public class DynamicFilterViewModel : DynamicPropertyViewModel 7 | { 8 | 9 | public DynamicFilterViewModel(DynamicPropertyMetadata dynamicPropertyMetadata) : base(dynamicPropertyMetadata) 10 | { 11 | } 12 | 13 | public string DynamicFilterViewName { get; set; } 14 | public IDynamicFilter FilterModel { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /NuGet.Packager/content/DynamicMVC/ViewModels/DynamicPropertyViewModels/DynamicPropertyEditorViewModel.cs: -------------------------------------------------------------------------------- 1 | using DynamicMVC.DynamicEntityMetadataLibrary.Models; 2 | using DynamicMVC.UI.DynamicMVC.ViewModels.DynamicEditorViewModels; 3 | 4 | namespace DynamicMVC.UI.DynamicMVC.ViewModels.DynamicPropertyViewModels 5 | { 6 | public class DynamicPropertyEditorViewModel : DynamicPropertyViewModel 7 | { 8 | public DynamicPropertyEditorViewModel(DynamicPropertyMetadata dynamicPropertyMetadata) : base(dynamicPropertyMetadata) 9 | { 10 | 11 | } 12 | 13 | public string DynamicEditorName { get; set; } 14 | public DynamicEditorHyperlinkViewModel DynamicEditorHyperlinkViewModel { get; set; } 15 | public DynamicEditorDropDownViewModel DynamicEditorDropDownViewModel { get; set; } 16 | public DynamicEditorAutoCompleteViewModel DynamicEditorAutoCompleteViewModel { get; set; } 17 | } 18 | } -------------------------------------------------------------------------------- /NuGet.Packager/content/DynamicMVC/ViewModels/DynamicPropertyViewModels/DynamicPropertyViewModel.cs: -------------------------------------------------------------------------------- 1 | using DynamicMVC.DynamicEntityMetadataLibrary.Models; 2 | using DynamicMVC.UI.DynamicMVC.Interfaces; 3 | 4 | #pragma warning disable 1591 5 | 6 | namespace DynamicMVC.UI.DynamicMVC.ViewModels.DynamicPropertyViewModels 7 | { 8 | public class DynamicPropertyViewModel : IDynamicDisplayName 9 | { 10 | public DynamicPropertyViewModel(DynamicPropertyMetadata dynamicPropertyMetadata) 11 | { 12 | ViewModelPropertyName = dynamicPropertyMetadata.PropertyName; 13 | PropertyName = dynamicPropertyMetadata.PropertyName; 14 | DisplayName = dynamicPropertyMetadata.DisplayName; 15 | } 16 | 17 | public string ViewModelPropertyName { get; set; } 18 | public string PropertyName { get; set; } 19 | public string DisplayName { get; set; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /NuGet.Packager/lib/DynamicMVC.Data.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PrecisionWebTechnologies/DynamicMVC/a7aac78639c76281e1b1ce00b79ba8f0ee16bdc7/NuGet.Packager/lib/DynamicMVC.Data.dll -------------------------------------------------------------------------------- /NuGet.Packager/tools/init.ps1: -------------------------------------------------------------------------------- 1 | # Runs the first time a package is installed in a solution, and every time the solution is opened. 2 | 3 | param($installPath, $toolsPath, $package, $project) 4 | 5 | # $installPath is the path to the folder where the package is installed. 6 | # $toolsPath is the path to the tools directory in the folder where the package is installed. 7 | # $package is a reference to the package object. 8 | # $project is null in init.ps1 9 | -------------------------------------------------------------------------------- /NuGet.Packager/tools/install.ps1: -------------------------------------------------------------------------------- 1 | # Runs every time a package is installed in a project 2 | 3 | param($installPath, $toolsPath, $package, $project) 4 | 5 | # $installPath is the path to the folder where the package is installed. 6 | # $toolsPath is the path to the tools directory in the folder where the package is installed. 7 | # $package is a reference to the package object. 8 | # $project is a reference to the project the package was installed to. 9 | -------------------------------------------------------------------------------- /NuGet.Packager/tools/uninstall.ps1: -------------------------------------------------------------------------------- 1 | # Runs every time a package is uninstalled 2 | 3 | param($installPath, $toolsPath, $package, $project) 4 | 5 | # $installPath is the path to the folder where the package is installed. 6 | # $toolsPath is the path to the tools directory in the folder where the package is installed. 7 | # $package is a reference to the package object. 8 | # $project is a reference to the project the package was installed to. 9 | -------------------------------------------------------------------------------- /ReflectionLibrary/Interfaces/IAttributeMergeManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace ReflectionLibrary.Interfaces 8 | { 9 | public interface IAttributeMergeManager 10 | { 11 | void MergeAttributes(IReflectedClass source, IReflectedClass target); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ReflectionLibrary/Interfaces/IReflectedClassBuilder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace ReflectionLibrary.Interfaces 8 | { 9 | public interface IReflectedClassBuilder 10 | { 11 | IReflectedClass BuildReflectedClass(Type type); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ReflectionLibrary/Interfaces/IReflectedClassOperations.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ReflectionLibrary.Interfaces 4 | { 5 | /// 6 | /// Provides access to methods that require the underlying reflected class to be defined. 7 | /// 8 | public interface IReflectedClassOperations 9 | { 10 | /// 11 | /// Returns origonal type reflected. 12 | /// 13 | Func GetReflectedType { get; set; } 14 | 15 | /// 16 | /// Creates a new object 17 | /// 18 | Func CreateNewObject { get; set; } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /ReflectionLibrary/Interfaces/IReflectedLibraryManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace ReflectionLibrary.Interfaces 5 | { 6 | public interface IReflectedLibraryManager 7 | { 8 | IReflectedClass GetReflectedClass(Type type); 9 | ICollection GetReflectedClasses(IEnumerable types, params Func[] filters); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /ReflectionLibrary/Interfaces/IReflectedMethod.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace ReflectionLibrary.Interfaces 5 | { 6 | /// 7 | /// Shows All Information for MethodInfo 8 | /// 9 | public interface IReflectedMethod : IReflectedObjectWithAttributes 10 | { 11 | /// 12 | /// Method Name 13 | /// 14 | string Name { get; set; } 15 | /// 16 | /// Parent Class 17 | /// 18 | IReflectedClass ReflectedClass { get; set; } 19 | /// 20 | /// Attributes that are decorating this method 21 | /// 22 | ICollection Attributes { get; set; } 23 | 24 | IReflectedMethodOperations ReflectedMethodOperations { get; set; } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /ReflectionLibrary/Interfaces/IReflectedMethodBuilder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace ReflectionLibrary.Interfaces 5 | { 6 | public interface IReflectedMethodBuilder 7 | { 8 | void BuildReflectedMethods(IReflectedClass reflectedClass, Type type); 9 | ICollection BuildReflectedMethods(Type type); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /ReflectionLibrary/Interfaces/IReflectedMethodOperations.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reflection; 3 | 4 | namespace ReflectionLibrary.Interfaces 5 | { 6 | public interface IReflectedMethodOperations 7 | { 8 | Func InvokeFunction { get; set; } 9 | MethodInfo MethodInfo { get; set; } 10 | object Invoke(object obj, object[] paramaters); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /ReflectionLibrary/Interfaces/IReflectedObject.cs: -------------------------------------------------------------------------------- 1 | namespace ReflectionLibrary.Interfaces 2 | { 3 | /// 4 | /// An First class Object in the ReflectedLibrary 5 | /// 6 | public interface IReflectedObject 7 | { 8 | /// 9 | /// Name of underlying reflected object. 10 | /// 11 | string Name { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ReflectionLibrary/Interfaces/IReflectedObjectWithAttributes.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace ReflectionLibrary.Interfaces 5 | { 6 | /// 7 | /// Reflected Object with Attributes 8 | /// 9 | public interface IReflectedObjectWithAttributes : IReflectedObject 10 | { 11 | /// 12 | /// Attributes attached to the reflected object 13 | /// 14 | ICollection Attributes { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /ReflectionLibrary/Interfaces/IReflectedProperty.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using ReflectionLibrary.Enums; 4 | 5 | namespace ReflectionLibrary.Interfaces 6 | { 7 | public interface IReflectedProperty : IReflectedObjectWithAttributes 8 | { 9 | IReflectedPropertyOperations ReflectedPropertyOperations { get; set; } 10 | string Name { get; set; } 11 | IReflectedClass ReflectedClass { get; set; } 12 | ICollection Attributes { get; set; } 13 | string PropertyTypeName { get; set; } 14 | 15 | bool IsSimple { get; set; } 16 | SimpleTypeEnum SimpleTypeEnum { get; set; } 17 | bool IsComplex { get; set; } 18 | bool IsCollection { get; set; } 19 | string CollectionItemTypeName { get; set; } 20 | bool IsNullable { get; set; } 21 | ISimpleTypeParser SimpleTypeParser { get; set; } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ReflectionLibrary/Interfaces/IReflectedPropertyBuilder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace ReflectionLibrary.Interfaces 8 | { 9 | public interface IReflectedPropertyBuilder 10 | { 11 | void BuildReflectedProperties(IReflectedClass reflectedClass, Type type); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ReflectionLibrary/Interfaces/IReflectedPropertyOperations.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reflection; 3 | 4 | namespace ReflectionLibrary.Interfaces 5 | { 6 | /// 7 | /// Provides access to methods that require the underlying reflected property to be defined. 8 | /// 9 | public interface IReflectedPropertyOperations 10 | { 11 | /// 12 | /// Func value , item 13 | /// 14 | Func GetValueFunction { get; set; } 15 | 16 | /// 17 | /// propertyInfo.SetValue(item, value); 18 | /// 19 | Action SetValueAction { get; set; } 20 | 21 | /// 22 | /// Used to access functionality other than what is accessable in Reflected Property Operations 23 | /// 24 | PropertyInfo PropertyInfo { get; set; } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /ReflectionLibrary/Models/ReflectedClassOperations.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using ReflectionLibrary.Interfaces; 3 | 4 | namespace ReflectionLibrary.Models 5 | { 6 | /// 7 | /// Provides access to methods that require the underlying reflected class to be defined. 8 | /// 9 | public class ReflectedClassOperations : IReflectedClassOperations 10 | { 11 | /// 12 | /// Returns origonal type reflected. 13 | /// 14 | public Func GetReflectedType { get; set; } 15 | /// 16 | /// Creates a new object 17 | /// 18 | public Func CreateNewObject { get; set; } 19 | 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ReflectionLibrary/Models/ReflectedMethod.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using ReflectionLibrary.Interfaces; 4 | 5 | namespace ReflectionLibrary.Models 6 | { 7 | public class ReflectedMethod : IReflectedMethod 8 | { 9 | 10 | public ReflectedMethod() 11 | { 12 | Attributes = new HashSet(); 13 | } 14 | 15 | public string Name { get; set; } 16 | 17 | public IReflectedClass ReflectedClass { get; set; } 18 | public ICollection Attributes { get; set; } 19 | public IReflectedMethodOperations ReflectedMethodOperations { get; set; } 20 | 21 | public override string ToString() 22 | { 23 | return String.Format("{0} - {1} Attributes", Name, Attributes.Count); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /ReflectionLibrary/Models/ReflectedMethodOperations.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reflection; 3 | using ReflectionLibrary.Interfaces; 4 | 5 | namespace ReflectionLibrary.Models 6 | { 7 | public class ReflectedMethodOperations : IReflectedMethodOperations 8 | { 9 | public MethodInfo MethodInfo { get; set; } 10 | public Func InvokeFunction { get; set; } 11 | public object Invoke(object obj, object[] paramaters) 12 | { 13 | return InvokeFunction(obj, paramaters); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /ReflectionLibrary/Strategies/SimpleTypeParsers/SimpleTypeBoolNullableParser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using ReflectionLibrary.Enums; 3 | using ReflectionLibrary.Interfaces; 4 | 5 | namespace ReflectionLibrary.Strategies.SimpleTypeParsers 6 | { 7 | /// 8 | /// Simple Type Parser for bool? datatype 9 | /// 10 | public class SimpleTypeBoolNullableParser : ISimpleTypeParser 11 | { 12 | public Type GetSimpleType() 13 | { 14 | return typeof(bool?); 15 | } 16 | 17 | public dynamic Parse(string value) 18 | { 19 | return (bool?)bool.Parse(value); 20 | } 21 | 22 | public SimpleTypeEnum SimpleTypeEnum() 23 | { 24 | return Enums.SimpleTypeEnum.BoolNullable; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ReflectionLibrary/Strategies/SimpleTypeParsers/SimpleTypeBoolParser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using ReflectionLibrary.Enums; 3 | using ReflectionLibrary.Interfaces; 4 | 5 | namespace ReflectionLibrary.Strategies.SimpleTypeParsers 6 | { 7 | /// 8 | /// Simple Type Parser for bool datatype 9 | /// 10 | public class SimpleTypeBoolParser : ISimpleTypeParser 11 | { 12 | public Type GetSimpleType() 13 | { 14 | return typeof(bool); 15 | } 16 | 17 | public dynamic Parse(string value) 18 | { 19 | return bool.Parse(value); 20 | } 21 | 22 | public SimpleTypeEnum SimpleTypeEnum() 23 | { 24 | return Enums.SimpleTypeEnum.Bool; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ReflectionLibrary/Strategies/SimpleTypeParsers/SimpleTypeByteNullableParser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using ReflectionLibrary.Enums; 3 | using ReflectionLibrary.Interfaces; 4 | 5 | namespace ReflectionLibrary.Strategies.SimpleTypeParsers 6 | { 7 | /// 8 | /// Simple Type Parser for Nullable Byte datatype 9 | /// 10 | public class SimpleTypeByteNullableParser : ISimpleTypeParser 11 | { 12 | public Type GetSimpleType() 13 | { 14 | return typeof(byte?); 15 | } 16 | 17 | public dynamic Parse(string value) 18 | { 19 | return (byte?)byte.Parse(value); 20 | } 21 | 22 | public SimpleTypeEnum SimpleTypeEnum() 23 | { 24 | return Enums.SimpleTypeEnum.ByteNullable; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ReflectionLibrary/Strategies/SimpleTypeParsers/SimpleTypeByteParser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using ReflectionLibrary.Enums; 3 | using ReflectionLibrary.Interfaces; 4 | 5 | namespace ReflectionLibrary.Strategies.SimpleTypeParsers 6 | { 7 | /// 8 | /// Simple Type Parser for Byte datatype 9 | /// 10 | public class SimpleTypeByteParser : ISimpleTypeParser 11 | { 12 | public Type GetSimpleType() 13 | { 14 | return typeof(byte); 15 | } 16 | 17 | public dynamic Parse(string value) 18 | { 19 | return byte.Parse(value); 20 | } 21 | 22 | public SimpleTypeEnum SimpleTypeEnum() 23 | { 24 | return Enums.SimpleTypeEnum.Byte; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ReflectionLibrary/Strategies/SimpleTypeParsers/SimpleTypeCharNullableParser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using ReflectionLibrary.Enums; 3 | using ReflectionLibrary.Interfaces; 4 | 5 | namespace ReflectionLibrary.Strategies.SimpleTypeParsers 6 | { 7 | /// 8 | /// Simple Type Parser for Char datatype 9 | /// 10 | public class SimpleTypeCharNullableParser : ISimpleTypeParser 11 | { 12 | public Type GetSimpleType() 13 | { 14 | return typeof(char?); 15 | } 16 | 17 | public dynamic Parse(string value) 18 | { 19 | return (char?)char.Parse(value); 20 | } 21 | 22 | public SimpleTypeEnum SimpleTypeEnum() 23 | { 24 | return Enums.SimpleTypeEnum.CharNullable; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ReflectionLibrary/Strategies/SimpleTypeParsers/SimpleTypeCharParser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using ReflectionLibrary.Enums; 3 | using ReflectionLibrary.Interfaces; 4 | 5 | namespace ReflectionLibrary.Strategies.SimpleTypeParsers 6 | { 7 | /// 8 | /// Simple Type Parser for Nullable Char datatype 9 | /// 10 | public class SimpleTypeCharParser : ISimpleTypeParser 11 | { 12 | public Type GetSimpleType() 13 | { 14 | return typeof(char); 15 | } 16 | 17 | public dynamic Parse(string value) 18 | { 19 | return char.Parse(value); 20 | } 21 | 22 | public SimpleTypeEnum SimpleTypeEnum() 23 | { 24 | return Enums.SimpleTypeEnum.Char; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ReflectionLibrary/Strategies/SimpleTypeParsers/SimpleTypeDateTimeNullableParser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using ReflectionLibrary.Enums; 3 | using ReflectionLibrary.Interfaces; 4 | 5 | namespace ReflectionLibrary.Strategies.SimpleTypeParsers 6 | { 7 | /// 8 | /// Simple Type Parser for Nullable DateTime datatype 9 | /// 10 | public class SimpleTypeDateTimeNullableParser : ISimpleTypeParser 11 | { 12 | public Type GetSimpleType() 13 | { 14 | return typeof(DateTime?); 15 | } 16 | 17 | public dynamic Parse(string value) 18 | { 19 | return (DateTime?)DateTime.Parse(value); 20 | } 21 | 22 | public SimpleTypeEnum SimpleTypeEnum() 23 | { 24 | return Enums.SimpleTypeEnum.DateTimeNullable; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ReflectionLibrary/Strategies/SimpleTypeParsers/SimpleTypeDateTimeParser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using ReflectionLibrary.Enums; 3 | using ReflectionLibrary.Interfaces; 4 | 5 | namespace ReflectionLibrary.Strategies.SimpleTypeParsers 6 | { 7 | /// 8 | /// Simple Type Parser for DateTime datatype 9 | /// 10 | public class SimpleTypeDateTimeParser : ISimpleTypeParser 11 | { 12 | public Type GetSimpleType() 13 | { 14 | return typeof(DateTime); 15 | } 16 | 17 | public dynamic Parse(string value) 18 | { 19 | return DateTime.Parse(value); 20 | } 21 | 22 | public SimpleTypeEnum SimpleTypeEnum() 23 | { 24 | return Enums.SimpleTypeEnum.DateTime; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ReflectionLibrary/Strategies/SimpleTypeParsers/SimpleTypeDecimalNullableParser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using ReflectionLibrary.Enums; 3 | using ReflectionLibrary.Interfaces; 4 | 5 | namespace ReflectionLibrary.Strategies.SimpleTypeParsers 6 | { 7 | /// 8 | /// Simple Type Parser for Nullable Decimal datatype 9 | /// 10 | public class SimpleTypeDecimalNullableParser : ISimpleTypeParser 11 | { 12 | public Type GetSimpleType() 13 | { 14 | return typeof(decimal?); 15 | } 16 | 17 | public dynamic Parse(string value) 18 | { 19 | return (decimal?)decimal.Parse(value); 20 | } 21 | 22 | public SimpleTypeEnum SimpleTypeEnum() 23 | { 24 | return Enums.SimpleTypeEnum.DecimalNullable; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ReflectionLibrary/Strategies/SimpleTypeParsers/SimpleTypeDecimalParser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using ReflectionLibrary.Enums; 3 | using ReflectionLibrary.Interfaces; 4 | 5 | namespace ReflectionLibrary.Strategies.SimpleTypeParsers 6 | { 7 | /// 8 | /// Simple Type Parser for Decimal datatype 9 | /// 10 | public class SimpleTypeDecimalParser : ISimpleTypeParser 11 | { 12 | public Type GetSimpleType() 13 | { 14 | return typeof(decimal); 15 | } 16 | 17 | public dynamic Parse(string value) 18 | { 19 | return decimal.Parse(value); 20 | } 21 | 22 | public SimpleTypeEnum SimpleTypeEnum() 23 | { 24 | return Enums.SimpleTypeEnum.Decimal; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ReflectionLibrary/Strategies/SimpleTypeParsers/SimpleTypeDoubleNullableParser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using ReflectionLibrary.Enums; 3 | using ReflectionLibrary.Interfaces; 4 | 5 | namespace ReflectionLibrary.Strategies.SimpleTypeParsers 6 | { 7 | /// 8 | /// Simple Type Parser for Nullable Double datatype 9 | /// 10 | public class SimpleTypeDoubleNullableParser : ISimpleTypeParser 11 | { 12 | public Type GetSimpleType() 13 | { 14 | return typeof(double?); 15 | } 16 | 17 | public dynamic Parse(string value) 18 | { 19 | return (double?)double.Parse(value); 20 | } 21 | 22 | public SimpleTypeEnum SimpleTypeEnum() 23 | { 24 | return Enums.SimpleTypeEnum.DoubleNullable; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ReflectionLibrary/Strategies/SimpleTypeParsers/SimpleTypeDoubleParser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using ReflectionLibrary.Enums; 3 | using ReflectionLibrary.Interfaces; 4 | 5 | namespace ReflectionLibrary.Strategies.SimpleTypeParsers 6 | { 7 | /// 8 | /// Simple Type Parser for Double datatype 9 | /// 10 | public class SimpleTypeDoubleParser : ISimpleTypeParser 11 | { 12 | public Type GetSimpleType() 13 | { 14 | return typeof(double); 15 | } 16 | 17 | public dynamic Parse(string value) 18 | { 19 | return double.Parse(value); 20 | } 21 | 22 | public SimpleTypeEnum SimpleTypeEnum() 23 | { 24 | return Enums.SimpleTypeEnum.Double; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ReflectionLibrary/Strategies/SimpleTypeParsers/SimpleTypeFloatNullableParser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using ReflectionLibrary.Enums; 3 | using ReflectionLibrary.Interfaces; 4 | 5 | namespace ReflectionLibrary.Strategies.SimpleTypeParsers 6 | { 7 | /// 8 | /// Simple Type Parser for Nullable Float datatype 9 | /// 10 | public class SimpleTypeFloatNullableParser : ISimpleTypeParser 11 | { 12 | public Type GetSimpleType() 13 | { 14 | return typeof(float?); 15 | } 16 | 17 | public dynamic Parse(string value) 18 | { 19 | return (float?)float.Parse(value); 20 | } 21 | 22 | public SimpleTypeEnum SimpleTypeEnum() 23 | { 24 | return Enums.SimpleTypeEnum.FloatNullable; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ReflectionLibrary/Strategies/SimpleTypeParsers/SimpleTypeFloatParser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using ReflectionLibrary.Enums; 3 | using ReflectionLibrary.Interfaces; 4 | 5 | namespace ReflectionLibrary.Strategies.SimpleTypeParsers 6 | { 7 | /// 8 | /// Simple Type Parser for Float datatype 9 | /// 10 | public class SimpleTypeFloatParser : ISimpleTypeParser 11 | { 12 | public Type GetSimpleType() 13 | { 14 | return typeof(float); 15 | } 16 | 17 | public dynamic Parse(string value) 18 | { 19 | return float.Parse(value); 20 | } 21 | 22 | public SimpleTypeEnum SimpleTypeEnum() 23 | { 24 | return Enums.SimpleTypeEnum.Float; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ReflectionLibrary/Strategies/SimpleTypeParsers/SimpleTypeGuidNullableParser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using ReflectionLibrary.Enums; 3 | using ReflectionLibrary.Interfaces; 4 | 5 | namespace ReflectionLibrary.Strategies.SimpleTypeParsers 6 | { 7 | /// 8 | /// Simple Type Parser for Nullable Guid datatype 9 | /// 10 | public class SimpleTypeGuidNullableParser : ISimpleTypeParser 11 | { 12 | public Type GetSimpleType() 13 | { 14 | return typeof(Guid?); 15 | } 16 | 17 | public dynamic Parse(string value) 18 | { 19 | return (Guid?)Guid.Parse(value); 20 | } 21 | 22 | public SimpleTypeEnum SimpleTypeEnum() 23 | { 24 | return Enums.SimpleTypeEnum.GuidNullable; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ReflectionLibrary/Strategies/SimpleTypeParsers/SimpleTypeGuidParser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using ReflectionLibrary.Enums; 3 | using ReflectionLibrary.Interfaces; 4 | 5 | namespace ReflectionLibrary.Strategies.SimpleTypeParsers 6 | { 7 | /// 8 | /// Simple Type Parser for Guid datatype 9 | /// 10 | public class SimpleTypeGuidParser : ISimpleTypeParser 11 | { 12 | public Type GetSimpleType() 13 | { 14 | return typeof(Guid); 15 | } 16 | 17 | public dynamic Parse(string value) 18 | { 19 | return Guid.Parse(value); 20 | } 21 | 22 | public SimpleTypeEnum SimpleTypeEnum() 23 | { 24 | return Enums.SimpleTypeEnum.Guid; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ReflectionLibrary/Strategies/SimpleTypeParsers/SimpleTypeInt16NullableParser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using ReflectionLibrary.Enums; 3 | using ReflectionLibrary.Interfaces; 4 | 5 | namespace ReflectionLibrary.Strategies.SimpleTypeParsers 6 | { 7 | /// 8 | /// Simple Type Parser for Nullable Int16 datatype 9 | /// 10 | public class SimpleTypeInt16NullableParser : ISimpleTypeParser 11 | { 12 | public Type GetSimpleType() 13 | { 14 | return typeof(short?); 15 | } 16 | 17 | public dynamic Parse(string value) 18 | { 19 | return (short?)short.Parse(value); 20 | } 21 | 22 | public SimpleTypeEnum SimpleTypeEnum() 23 | { 24 | return Enums.SimpleTypeEnum.Int16Nullable; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ReflectionLibrary/Strategies/SimpleTypeParsers/SimpleTypeInt16Parser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using ReflectionLibrary.Enums; 3 | using ReflectionLibrary.Interfaces; 4 | 5 | namespace ReflectionLibrary.Strategies.SimpleTypeParsers 6 | { 7 | /// 8 | /// Simple Type Parser for Int16 datatype 9 | /// 10 | public class SimpleTypeInt16Parser : ISimpleTypeParser 11 | { 12 | public Type GetSimpleType() 13 | { 14 | return typeof(short); 15 | } 16 | 17 | public dynamic Parse(string value) 18 | { 19 | return short.Parse(value); 20 | } 21 | 22 | public SimpleTypeEnum SimpleTypeEnum() 23 | { 24 | return Enums.SimpleTypeEnum.Int16; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ReflectionLibrary/Strategies/SimpleTypeParsers/SimpleTypeInt32NullableParser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using ReflectionLibrary.Enums; 3 | using ReflectionLibrary.Interfaces; 4 | 5 | namespace ReflectionLibrary.Strategies.SimpleTypeParsers 6 | { 7 | /// 8 | /// Simple Type Parser for Nullable Int32 datatype 9 | /// 10 | public class SimpleTypeInt32NullableParser : ISimpleTypeParser 11 | { 12 | public Type GetSimpleType() 13 | { 14 | return typeof(int?); 15 | } 16 | 17 | public dynamic Parse(string value) 18 | { 19 | return (int?)int.Parse(value); 20 | } 21 | 22 | public SimpleTypeEnum SimpleTypeEnum() 23 | { 24 | return Enums.SimpleTypeEnum.Int32Nullable; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ReflectionLibrary/Strategies/SimpleTypeParsers/SimpleTypeInt32Parser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using ReflectionLibrary.Enums; 3 | using ReflectionLibrary.Interfaces; 4 | 5 | namespace ReflectionLibrary.Strategies.SimpleTypeParsers 6 | { 7 | /// 8 | /// Simple Type Parser for Int32 datatype 9 | /// 10 | public class SimpleTypeInt32Parser : ISimpleTypeParser 11 | { 12 | public Type GetSimpleType() 13 | { 14 | return typeof(int); 15 | } 16 | 17 | public dynamic Parse(string value) 18 | { 19 | return int.Parse(value); 20 | } 21 | 22 | public SimpleTypeEnum SimpleTypeEnum() 23 | { 24 | return Enums.SimpleTypeEnum.Int32; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ReflectionLibrary/Strategies/SimpleTypeParsers/SimpleTypeInt64NullableParser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using ReflectionLibrary.Enums; 3 | using ReflectionLibrary.Interfaces; 4 | 5 | namespace ReflectionLibrary.Strategies.SimpleTypeParsers 6 | { 7 | /// 8 | /// Simple Type Parser for Nullable Int64 datatype 9 | /// 10 | public class SimpleTypeInt64NullableParser : ISimpleTypeParser 11 | { 12 | public Type GetSimpleType() 13 | { 14 | return typeof(long?); 15 | } 16 | 17 | public dynamic Parse(string value) 18 | { 19 | return (long?)long.Parse(value); 20 | } 21 | 22 | public SimpleTypeEnum SimpleTypeEnum() 23 | { 24 | return Enums.SimpleTypeEnum.Int64Nullable; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ReflectionLibrary/Strategies/SimpleTypeParsers/SimpleTypeInt64Parser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using ReflectionLibrary.Enums; 3 | using ReflectionLibrary.Interfaces; 4 | 5 | namespace ReflectionLibrary.Strategies.SimpleTypeParsers 6 | { 7 | /// 8 | /// Simple Type Parser for Int64 datatype 9 | /// 10 | public class SimpleTypeInt64Parser : ISimpleTypeParser 11 | { 12 | public Type GetSimpleType() 13 | { 14 | return typeof(long); 15 | } 16 | 17 | public dynamic Parse(string value) 18 | { 19 | return long.Parse(value); 20 | } 21 | 22 | public SimpleTypeEnum SimpleTypeEnum() 23 | { 24 | return Enums.SimpleTypeEnum.Int64; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ReflectionLibrary/Strategies/SimpleTypeParsers/SimpleTypeSByteNullableParser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using ReflectionLibrary.Enums; 3 | using ReflectionLibrary.Interfaces; 4 | 5 | namespace ReflectionLibrary.Strategies.SimpleTypeParsers 6 | { 7 | /// 8 | /// Simple Type Parser for Nullable SByte datatype 9 | /// 10 | public class SimpleTypeSByteNullableParser : ISimpleTypeParser 11 | { 12 | public Type GetSimpleType() 13 | { 14 | return typeof(sbyte?); 15 | } 16 | 17 | public dynamic Parse(string value) 18 | { 19 | return (sbyte?)sbyte.Parse(value); 20 | } 21 | 22 | public SimpleTypeEnum SimpleTypeEnum() 23 | { 24 | return Enums.SimpleTypeEnum.SByteNullable; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ReflectionLibrary/Strategies/SimpleTypeParsers/SimpleTypeSByteParser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using ReflectionLibrary.Enums; 3 | using ReflectionLibrary.Interfaces; 4 | 5 | namespace ReflectionLibrary.Strategies.SimpleTypeParsers 6 | { 7 | /// 8 | /// Simple Type Parser for SByte datatype 9 | /// 10 | public class SimpleTypeSByteParser : ISimpleTypeParser 11 | { 12 | public Type GetSimpleType() 13 | { 14 | return typeof(sbyte); 15 | } 16 | 17 | public dynamic Parse(string value) 18 | { 19 | return sbyte.Parse(value); 20 | } 21 | 22 | public SimpleTypeEnum SimpleTypeEnum() 23 | { 24 | return Enums.SimpleTypeEnum.SByte; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ReflectionLibrary/Strategies/SimpleTypeParsers/SimpleTypeStringParser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using ReflectionLibrary.Enums; 3 | using ReflectionLibrary.Interfaces; 4 | 5 | namespace ReflectionLibrary.Strategies.SimpleTypeParsers 6 | { 7 | /// 8 | /// Simple Type Parser for String datatype 9 | /// 10 | public class SimpleTypeStringParser : ISimpleTypeParser 11 | { 12 | public Type GetSimpleType() 13 | { 14 | return typeof(string); 15 | } 16 | 17 | public dynamic Parse(string value) 18 | { 19 | return value; 20 | } 21 | 22 | public SimpleTypeEnum SimpleTypeEnum() 23 | { 24 | return Enums.SimpleTypeEnum.String; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ReflectionLibrary/Strategies/SimpleTypeParsers/SimpleTypeUInt16NullableParser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using ReflectionLibrary.Enums; 3 | using ReflectionLibrary.Interfaces; 4 | 5 | namespace ReflectionLibrary.Strategies.SimpleTypeParsers 6 | { 7 | /// 8 | /// Simple Type Parser for Nullable UInt16 datatype 9 | /// 10 | public class SimpleTypeUInt16NullableParser : ISimpleTypeParser 11 | { 12 | public Type GetSimpleType() 13 | { 14 | return typeof(ushort?); 15 | } 16 | 17 | public dynamic Parse(string value) 18 | { 19 | return (ushort?)ushort.Parse(value); 20 | } 21 | 22 | public SimpleTypeEnum SimpleTypeEnum() 23 | { 24 | return Enums.SimpleTypeEnum.UInt32Nullable; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ReflectionLibrary/Strategies/SimpleTypeParsers/SimpleTypeUInt16Parser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using ReflectionLibrary.Enums; 3 | using ReflectionLibrary.Interfaces; 4 | 5 | namespace ReflectionLibrary.Strategies.SimpleTypeParsers 6 | { 7 | /// 8 | /// Simple Type Parser for UInt16 datatype 9 | /// 10 | public class SimpleTypeUInt16Parser : ISimpleTypeParser 11 | { 12 | public Type GetSimpleType() 13 | { 14 | return typeof(ushort); 15 | } 16 | 17 | public dynamic Parse(string value) 18 | { 19 | return ushort.Parse(value); 20 | } 21 | 22 | public SimpleTypeEnum SimpleTypeEnum() 23 | { 24 | return Enums.SimpleTypeEnum.UInt16; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ReflectionLibrary/Strategies/SimpleTypeParsers/SimpleTypeUInt32NullableParser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using ReflectionLibrary.Enums; 3 | using ReflectionLibrary.Interfaces; 4 | 5 | namespace ReflectionLibrary.Strategies.SimpleTypeParsers 6 | { 7 | /// 8 | /// Simple Type Parser for Nullable UInt32 datatype 9 | /// 10 | public class SimpleTypeUInt32NullableParser : ISimpleTypeParser 11 | { 12 | public Type GetSimpleType() 13 | { 14 | return typeof(uint?); 15 | } 16 | 17 | public dynamic Parse(string value) 18 | { 19 | return (uint?)uint.Parse(value); 20 | } 21 | 22 | public SimpleTypeEnum SimpleTypeEnum() 23 | { 24 | return Enums.SimpleTypeEnum.UInt32Nullable; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ReflectionLibrary/Strategies/SimpleTypeParsers/SimpleTypeUInt32Parser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using ReflectionLibrary.Enums; 3 | using ReflectionLibrary.Interfaces; 4 | 5 | namespace ReflectionLibrary.Strategies.SimpleTypeParsers 6 | { 7 | /// 8 | /// Simple Type Parser for UInt32 datatype 9 | /// 10 | public class SimpleTypeUInt32Parser : ISimpleTypeParser 11 | { 12 | public Type GetSimpleType() 13 | { 14 | return typeof(uint); 15 | } 16 | 17 | public dynamic Parse(string value) 18 | { 19 | return uint.Parse(value); 20 | } 21 | 22 | public SimpleTypeEnum SimpleTypeEnum() 23 | { 24 | return Enums.SimpleTypeEnum.UInt32; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ReflectionLibrary/Strategies/SimpleTypeParsers/SimpleTypeUInt64NullableParser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using ReflectionLibrary.Enums; 3 | using ReflectionLibrary.Interfaces; 4 | 5 | namespace ReflectionLibrary.Strategies.SimpleTypeParsers 6 | { 7 | /// 8 | /// Simple Type Parser for Nullable UInt64 datatype 9 | /// 10 | public class SimpleTypeUInt64NullableParser : ISimpleTypeParser 11 | { 12 | public Type GetSimpleType() 13 | { 14 | return typeof(ulong?); 15 | } 16 | 17 | public dynamic Parse(string value) 18 | { 19 | return (ulong?)ulong.Parse(value); 20 | } 21 | 22 | public SimpleTypeEnum SimpleTypeEnum() 23 | { 24 | return Enums.SimpleTypeEnum.UInt64Nullable; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ReflectionLibrary/Strategies/SimpleTypeParsers/SimpleTypeUInt64Parser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using ReflectionLibrary.Enums; 3 | using ReflectionLibrary.Interfaces; 4 | 5 | namespace ReflectionLibrary.SimpleTypeParsers 6 | { 7 | /// 8 | /// Simple Type Parser for UInt64 datatype 9 | /// 10 | public class SimpleTypeUInt64Parser : ISimpleTypeParser 11 | { 12 | public Type GetSimpleType() 13 | { 14 | return typeof(ulong); 15 | } 16 | 17 | public dynamic Parse(string value) 18 | { 19 | return ulong.Parse(value); 20 | } 21 | 22 | public SimpleTypeEnum SimpleTypeEnum() 23 | { 24 | return ReflectionLibrary.Enums.SimpleTypeEnum.UInt64; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ReflectionLibrary/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /ReflectionLibraryTests/Builders/ReflectedPropertyBuilderTests.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.TestTools.UnitTesting; 2 | using ReflectionLibrary.Builders; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace ReflectionLibrary.Builders.Tests 10 | { 11 | [TestClass()] 12 | public class ReflectedPropertyBuilderTests 13 | { 14 | [TestMethod()] 15 | public void BuildReflectedPropertiesTest() 16 | { 17 | Assert.Fail(); 18 | } 19 | } 20 | } --------------------------------------------------------------------------------