├── .gitattributes ├── .gitignore ├── FrontDesk ├── Common.Tests │ ├── Common.Tests.csproj │ ├── EntityWithGuidKeyEqualsShould.cs │ ├── EntityWithIntKeyEqualsShould.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── Common │ ├── Common.csproj │ ├── Common.jmconfig │ ├── Common.sln │ ├── Contact.cs │ ├── Entity.cs │ ├── FullName.cs │ ├── Identity.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── ValueObject.cs ├── DomainEventsConsole │ ├── DomainEventsConsole.jmconfig │ ├── DomainEventsConsole.sln │ └── DomainEventsConsole │ │ ├── App.config │ │ ├── ConsoleWriter.cs │ │ ├── DomainEventsConsole.csproj │ │ ├── Events │ │ ├── AppointmentConfirmed.cs │ │ ├── AppointmentCreated.cs │ │ ├── DomainEvents.cs │ │ └── DomainEventsV1.cs │ │ ├── Handlers │ │ ├── NotifyUIAppointmentConfirmed.cs │ │ ├── NotifyUIAppointmentCreated.cs │ │ └── NotifyUserAppointmentCreated.cs │ │ ├── Interfaces │ │ ├── IDomainEvent.cs │ │ ├── IEntity.cs │ │ ├── IHandle.cs │ │ └── IRepository.cs │ │ ├── Model │ │ └── Appointment.cs │ │ ├── Program.cs │ │ ├── Properties │ │ └── AssemblyInfo.cs │ │ ├── Repositories │ │ └── Repository.cs │ │ ├── Services │ │ └── AppointmentSchedulingService.cs │ │ ├── UnitTests │ │ └── AppointmentCreateShould.cs │ │ └── packages.config ├── FrontDeskSolution │ ├── .nuget │ │ ├── NuGet.Config │ │ ├── NuGet.exe │ │ ├── NuGet.targets │ │ └── packages.config │ ├── .vs │ │ └── config │ │ │ └── applicationhost.config │ ├── AppointmentScheduling.Core │ │ ├── AppointmentScheduling.Core.csproj │ │ ├── ClassDiagram1.cd │ │ ├── ClassDiagram2.cd │ │ ├── ClassDiagram3.cd │ │ ├── ClassDiagram4.cd │ │ ├── ClassDiagram5.cd │ │ ├── ClassDiagram6.cd │ │ ├── Interfaces │ │ │ ├── IApplicationSettings.cs │ │ │ ├── IAppointmentDTORepository.cs │ │ │ ├── IMessagePublisher.cs │ │ │ ├── IRepository.cs │ │ │ └── IScheduleRepository.cs │ │ ├── Model │ │ │ ├── ApplicationEvents │ │ │ │ ├── AppointmentConfirmedEvent.cs │ │ │ │ └── AppointmentScheduledEvent.cs │ │ │ ├── AppointmentDTO.cs │ │ │ ├── Events │ │ │ │ ├── AppointmentConfirmedEvent.cs │ │ │ │ ├── AppointmentScheduledEvent.cs │ │ │ │ └── AppointmentUpdatedEvent.cs │ │ │ ├── ScheduleAggregate │ │ │ │ ├── Appointment.cs │ │ │ │ ├── AppointmentType.cs │ │ │ │ ├── Client.cs │ │ │ │ ├── Doctor.cs │ │ │ │ ├── Patient.cs │ │ │ │ ├── Room.cs │ │ │ │ └── Schedule.cs │ │ │ └── ValueObjects │ │ │ │ └── AnimalType.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ └── Services │ │ │ ├── EmailConfirmationHandler.cs │ │ │ └── RelayAppointmentScheduledService.cs │ ├── AppointmentScheduling.Data │ │ ├── App.config │ │ ├── AppointmentScheduling.Data.csproj │ │ ├── DemoOnlyPersistenceModel │ │ │ ├── Appointment.cs │ │ │ ├── AppointmentType.cs │ │ │ ├── Client.cs │ │ │ ├── Doctor.cs │ │ │ ├── Patient.cs │ │ │ ├── Room.cs │ │ │ └── Schedule.cs │ │ ├── Events │ │ │ ├── Message.cs │ │ │ └── ServiceBrokerWrapper.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── Repositories │ │ │ ├── AppointmentDTORepository.cs │ │ │ └── ScheduleRepository.cs │ │ ├── SchedulingContext.cs │ │ ├── SchedulingPersistenceContext.cs │ │ ├── Services │ │ │ └── ServiceBrokerMessagePublisher.cs │ │ └── packages.config │ ├── AppointmentScheduling.IntegrationTests │ │ ├── App.config │ │ ├── AppointmentScheduling.IntegrationTests.csproj │ │ ├── Data │ │ │ ├── ScheduleRepositoryShould.cs │ │ │ └── SchedulingContextShould.cs │ │ ├── Events │ │ │ └── ServiceBrokerTester.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ └── packages.config │ ├── AppointmentScheduling.UnitTests │ │ ├── AppointmentScheduling.UnitTests.csproj │ │ ├── Model │ │ │ ├── AppointmentConfirmShould.cs │ │ │ ├── AppointmentCreateShould.cs │ │ │ ├── AppointmentShould.cs │ │ │ ├── AppointmentUpdateRoomShould.cs │ │ │ ├── AppointmentUpdateTimeShould.cs │ │ │ ├── ScheduleAddNewAppointmentShould.cs │ │ │ └── ScheduleShould.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── Services │ │ │ ├── MessageBusNotificationServiceShould.cs │ │ │ └── PatientRegistrationServiceShould.cs │ │ └── packages.config │ ├── Build.bat │ ├── Build.proj │ ├── ClickToBuild.bat │ ├── ClientPatientManagement.Core │ │ ├── ClassDiagram1.cd │ │ ├── ClientPatientManagement.Core.csproj │ │ ├── Interfaces │ │ │ ├── IEntity.cs │ │ │ └── IRepository.cs │ │ ├── Model │ │ │ ├── Client.cs │ │ │ ├── Doctor.cs │ │ │ ├── Patient.cs │ │ │ └── Room.cs │ │ └── Properties │ │ │ └── AssemblyInfo.cs │ ├── ClientPatientManagement.Data │ │ ├── App.config │ │ ├── ClientPatientManagement.Data.csproj │ │ ├── CrudContext.cs │ │ ├── NonRoot.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── Repository.cs │ │ └── packages.config │ ├── ClientPatientManagement.IntegrationTests │ │ ├── App.config │ │ ├── ClientPatientManagement.IntegrationTests.csproj │ │ ├── CrudContextShould.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ └── packages.config │ ├── ClientPatientManagement.UnitTests │ │ ├── ClientPatientManagement.UnitTests.csproj │ │ ├── Model │ │ │ ├── ClientShould.cs │ │ │ └── PatientShould.cs │ │ └── Properties │ │ │ └── AssemblyInfo.cs │ ├── DDD Session Tests │ │ ├── App.config │ │ ├── DDD Session Tests.csproj │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── Stylesheet1.css │ │ ├── TestModels.cs │ │ ├── UnitTest1.cs │ │ ├── packages.config │ │ └── sampson.gif │ ├── DomainEvents.cs │ ├── FrontDesk.SharedKernel │ │ ├── ClassDiagram1.cd │ │ ├── ClassDiagram2.cd │ │ ├── DateTimeRange.cs │ │ ├── DomainEvents.cs │ │ ├── Entity.cs │ │ ├── Enums │ │ │ └── Gender.cs │ │ ├── FrontDesk.SharedKernel.csproj │ │ ├── Guard.cs │ │ ├── Interfaces │ │ │ ├── IApplicationEvent.cs │ │ │ ├── IDomainEvent.cs │ │ │ └── IHandle.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── ValueObject.cs │ │ └── packages.config │ ├── FrontDesk.Web │ │ ├── App_Start │ │ │ ├── BundleConfig.cs │ │ │ ├── FilterConfig.cs │ │ │ ├── MessagingConfig.cs │ │ │ ├── RouteConfig.cs │ │ │ ├── Startup.cs │ │ │ ├── StructuremapMvc.cs │ │ │ └── WebApiConfig.cs │ │ ├── Areas │ │ │ └── HelpPage │ │ │ │ ├── ApiDescriptionExtensions.cs │ │ │ │ ├── App_Start │ │ │ │ └── HelpPageConfig.cs │ │ │ │ ├── Controllers │ │ │ │ └── HelpController.cs │ │ │ │ ├── HelpPage.css │ │ │ │ ├── HelpPageAreaRegistration.cs │ │ │ │ ├── HelpPageConfigurationExtensions.cs │ │ │ │ ├── Models │ │ │ │ └── HelpPageApiModel.cs │ │ │ │ ├── SampleGeneration │ │ │ │ ├── HelpPageSampleGenerator.cs │ │ │ │ ├── HelpPageSampleKey.cs │ │ │ │ ├── ImageSample.cs │ │ │ │ ├── InvalidSample.cs │ │ │ │ ├── ObjectGenerator.cs │ │ │ │ ├── SampleDirection.cs │ │ │ │ └── TextSample.cs │ │ │ │ ├── Views │ │ │ │ ├── Help │ │ │ │ │ ├── Api.cshtml │ │ │ │ │ ├── DisplayTemplates │ │ │ │ │ │ ├── ApiGroup.cshtml │ │ │ │ │ │ ├── HelpPageApiModel.cshtml │ │ │ │ │ │ ├── ImageSample.cshtml │ │ │ │ │ │ ├── InvalidSample.cshtml │ │ │ │ │ │ ├── Parameters.cshtml │ │ │ │ │ │ ├── Samples.cshtml │ │ │ │ │ │ └── TextSample.cshtml │ │ │ │ │ └── Index.cshtml │ │ │ │ ├── Shared │ │ │ │ │ └── _Layout.cshtml │ │ │ │ ├── Web.config │ │ │ │ └── _ViewStart.cshtml │ │ │ │ └── XmlDocumentationProvider.cs │ │ ├── Content │ │ │ ├── Site.css │ │ │ ├── console.css │ │ │ └── themes │ │ │ │ └── base │ │ │ │ ├── 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 │ │ │ │ ├── jquery-ui.css │ │ │ │ ├── jquery.ui.accordion.css │ │ │ │ ├── jquery.ui.all.css │ │ │ │ ├── jquery.ui.autocomplete.css │ │ │ │ ├── jquery.ui.base.css │ │ │ │ ├── jquery.ui.button.css │ │ │ │ ├── jquery.ui.core.css │ │ │ │ ├── jquery.ui.datepicker.css │ │ │ │ ├── jquery.ui.dialog.css │ │ │ │ ├── jquery.ui.progressbar.css │ │ │ │ ├── jquery.ui.resizable.css │ │ │ │ ├── jquery.ui.selectable.css │ │ │ │ ├── jquery.ui.slider.css │ │ │ │ ├── jquery.ui.tabs.css │ │ │ │ ├── jquery.ui.theme.css │ │ │ │ └── minified │ │ │ │ ├── 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 │ │ │ │ ├── jquery-ui.min.css │ │ │ │ ├── jquery.ui.accordion.min.css │ │ │ │ ├── jquery.ui.autocomplete.min.css │ │ │ │ ├── jquery.ui.button.min.css │ │ │ │ ├── jquery.ui.core.min.css │ │ │ │ ├── jquery.ui.datepicker.min.css │ │ │ │ ├── jquery.ui.dialog.min.css │ │ │ │ ├── jquery.ui.progressbar.min.css │ │ │ │ ├── jquery.ui.resizable.min.css │ │ │ │ ├── jquery.ui.selectable.min.css │ │ │ │ ├── jquery.ui.slider.min.css │ │ │ │ ├── jquery.ui.tabs.min.css │ │ │ │ └── jquery.ui.theme.min.css │ │ ├── Controllers │ │ │ ├── Api │ │ │ │ ├── AppointmentTypesController.cs │ │ │ │ ├── AppointmentsController.cs │ │ │ │ ├── ClientsController.cs │ │ │ │ ├── DoctorsController.cs │ │ │ │ └── crud │ │ │ │ │ ├── CrudClientsController.cs │ │ │ │ │ ├── CrudDoctorsController.cs │ │ │ │ │ └── CrudRoomsController.cs │ │ │ └── HomeController.cs │ │ ├── DependencyResolution │ │ │ ├── IoC.cs │ │ │ ├── SignalRSmDependencyResolver.cs │ │ │ ├── StructureMapDependencyResolver.cs │ │ │ └── StructureMapDependencyScope.cs │ │ ├── FrontDesk.Web.csproj │ │ ├── Global.asax │ │ ├── Global.asax.cs │ │ ├── Hubs │ │ │ ├── AppointmentConfirmedHandler.cs │ │ │ ├── AppointmentUpdateHandler.cs │ │ │ ├── HubActivator.cs │ │ │ └── ScheduleHub.cs │ │ ├── Images │ │ │ ├── Clients │ │ │ │ └── Steve_Smith.jpg │ │ │ ├── Doctors │ │ │ │ ├── Dr_McDreamy.jpg │ │ │ │ ├── Dr_Smith.jpg │ │ │ │ ├── Dr_Who.jpg │ │ │ │ └── No_Doctor_Selected.jpg │ │ │ ├── Patients │ │ │ │ ├── Allegra.jpg │ │ │ │ ├── Anubis.jpg │ │ │ │ ├── Bella.jpg │ │ │ │ ├── Boots.jpg │ │ │ │ ├── Butterfinger.jpg │ │ │ │ ├── Callie.jpg │ │ │ │ ├── Corde.jpg │ │ │ │ ├── Finley.jpg │ │ │ │ ├── Ginger.jpg │ │ │ │ ├── Indiana Jones.jpg │ │ │ │ ├── Lizzie.jpg │ │ │ │ ├── Luabelle.jpg │ │ │ │ ├── Lulu.jpg │ │ │ │ ├── Pax.jpg │ │ │ │ ├── Piper.jpg │ │ │ │ ├── Rocky.jpg │ │ │ │ ├── Rufus.JPG │ │ │ │ ├── Ruske.jpg │ │ │ │ ├── Tinkerbell.jpg │ │ │ │ ├── Zak.jpg │ │ │ │ ├── charlie.jpg │ │ │ │ ├── darwin.jpg │ │ │ │ ├── radar.jpg │ │ │ │ ├── rumor.jpg │ │ │ │ ├── sampson.jpg │ │ │ │ └── zoe.jpg │ │ │ ├── accent.png │ │ │ ├── bullet.png │ │ │ ├── heroAccent.png │ │ │ ├── orderedList0.png │ │ │ ├── orderedList1.png │ │ │ ├── orderedList2.png │ │ │ ├── orderedList3.png │ │ │ ├── orderedList4.png │ │ │ ├── orderedList5.png │ │ │ ├── orderedList6.png │ │ │ ├── orderedList7.png │ │ │ ├── orderedList8.png │ │ │ └── orderedList9.png │ │ ├── Models │ │ │ ├── CreateAppointmentViewModel.cs │ │ │ ├── DoctorViewModel.cs │ │ │ └── OfficeSettings.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── Scripts │ │ │ ├── _references.js │ │ │ ├── console.js │ │ │ ├── header.js │ │ │ ├── jquery-1.8.2.js │ │ │ ├── jquery-2.0.3.intellisense.js │ │ │ ├── jquery-2.0.3.js │ │ │ ├── jquery-2.0.3.min.js │ │ │ ├── jquery-2.0.3.min.map │ │ │ ├── jquery-ui-1.8.24.js │ │ │ ├── jquery-ui-1.8.24.min.js │ │ │ ├── jquery.signalR-2.0.3.js │ │ │ ├── jquery.signalR-2.0.3.min.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 │ │ │ ├── kendo.all.min.js │ │ │ ├── knockout-2.2.0.debug.js │ │ │ ├── knockout-2.2.0.js │ │ │ └── modernizr-2.6.2.js │ │ ├── Views │ │ │ ├── Home │ │ │ │ ├── Clients.cshtml │ │ │ │ ├── Doctors.cshtml │ │ │ │ ├── Index.cshtml │ │ │ │ └── Rooms.cshtml │ │ │ ├── Shared │ │ │ │ ├── Error.cshtml │ │ │ │ └── _Layout.cshtml │ │ │ ├── Web.config │ │ │ └── _ViewStart.cshtml │ │ ├── Web.Debug.config │ │ ├── Web.Release.config │ │ ├── Web.config │ │ ├── favicon.ico │ │ └── packages.config │ ├── FrontDesk.jmconfig │ ├── FrontDesk.sln │ ├── README.txt │ ├── Requirements.md │ ├── SharedDatabaseManagement │ │ ├── App.config │ │ ├── DataModel │ │ │ └── VetOfficeContext.cs │ │ ├── Model │ │ │ ├── Appointment.cs │ │ │ ├── AppointmentType.cs │ │ │ ├── Client.cs │ │ │ ├── Doctor.cs │ │ │ ├── Patient.cs │ │ │ ├── Room.cs │ │ │ ├── Schedule.cs │ │ │ └── ValueObjects │ │ │ │ ├── AnimalType.cs │ │ │ │ └── AppointmentStartEnd.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── VetOffice.SharedDatabase.csproj │ │ └── packages.config │ ├── SharedDatabaseTests │ │ ├── App.config │ │ ├── Data │ │ │ └── SchedulingContextShould.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── SharedDatabaseTests.csproj │ │ └── packages.config │ └── SharedKernel.UnitTests │ │ ├── DateTimeRangeShould.cs │ │ ├── Properties │ │ └── AssemblyInfo.cs │ │ ├── SharedKernel.UnitTests.csproj │ │ └── packages.config ├── ReportViewerSolution │ ├── .nuget │ │ ├── NuGet.Config │ │ ├── NuGet.exe │ │ └── NuGet.targets │ ├── AboutThisSolution.txt │ ├── Build.bat │ ├── Build.proj │ ├── ClickToBuild.bat │ ├── PatientHistory.Core │ │ ├── Entities │ │ │ ├── PatientInfo.cs │ │ │ ├── Visit.cs │ │ │ └── VisitNote.cs │ │ ├── Enums │ │ │ └── OverallHealthStatus.cs │ │ ├── PatientHistory.Core.csproj │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ └── ValueObjects │ │ │ ├── CheckedInPatientResultItem.cs │ │ │ └── PatientResultItem.cs │ ├── PatientHistory.Infrastructure │ │ ├── Helpers │ │ │ └── DBSeedingInitializer.cs │ │ ├── PatientHistory.Infrastructure.csproj │ │ ├── PatientHistoryDataContext.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── Repository.cs │ │ └── packages.config │ ├── PatientHistory.UnitTests │ │ ├── App.config │ │ ├── Features │ │ │ ├── Checked In Patients │ │ │ │ ├── SelectPatientFromCheckedInList.feature │ │ │ │ ├── SelectPatientFromCheckedInList.feature.cs │ │ │ │ └── SelectPatientFromCheckedInListSteps.cs │ │ │ └── Name Search │ │ │ │ ├── Retrieve Patient from User Selection.feature │ │ │ │ ├── Retrieve Patient from User Selection.feature.cs │ │ │ │ ├── RetrievePatientFromUserSelectionSteps.cs │ │ │ │ ├── SearchForPatient.feature │ │ │ │ ├── SearchForPatient.feature.cs │ │ │ │ ├── SearchForPatientSteps.cs │ │ │ │ └── coding process A.jpg │ │ ├── Helpers │ │ │ └── DBSeedingInitializer.cs │ │ ├── PatientHistory.UnitTests.csproj │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ └── packages.config │ ├── PatientHistory.WebAPI │ │ ├── App_Start │ │ │ ├── FilterConfig.cs │ │ │ ├── RouteConfig.cs │ │ │ └── WebApiConfig.cs │ │ ├── Controllers │ │ │ ├── PatientNotesController.cs │ │ │ └── PatientRepoDependency.cs │ │ ├── Global.asax │ │ ├── Global.asax.cs │ │ ├── PatientHistory.WebAPI.csproj │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── Web.Debug.config │ │ ├── Web.Release.config │ │ ├── Web.config │ │ └── packages.config │ ├── PatientHistory.sln │ └── WebAPI.Tests │ │ ├── App.config │ │ ├── Fakes │ │ └── Repository.fakes │ │ ├── Properties │ │ └── AssemblyInfo.cs │ │ ├── UnitTest1.cs │ │ ├── WebAPI.Tests.csproj │ │ └── packages.config ├── SetupSQLServiceBroker.sql ├── VetClinicPublic.Web │ ├── VetClinicPublic.Web.sln │ ├── VetClinicPublic.Web.v12.suo.r223 │ ├── VetClinicPublic.Web.v12.suo.r225 │ └── VetClinicPublic.Web │ │ ├── App_Start │ │ ├── BundleConfig.cs │ │ ├── FilterConfig.cs │ │ ├── Message.cs │ │ ├── MessagingConfig.cs │ │ ├── RouteConfig.cs │ │ ├── ServiceBrokerWrapper.cs │ │ ├── Startup.Auth.cs │ │ └── StructuremapMvc.cs │ │ ├── Content │ │ ├── Site.css │ │ ├── bootstrap.css │ │ └── bootstrap.min.css │ │ ├── Controllers │ │ ├── AppointmentController.cs │ │ └── HomeController.cs │ │ ├── DependencyResolution │ │ ├── IoC.cs │ │ ├── StructureMapDependencyResolver.cs │ │ └── StructureMapDependencyScope.cs │ │ ├── Global.asax │ │ ├── Global.asax.cs │ │ ├── Interfaces │ │ └── ISendConfirmationEmails.cs │ │ ├── Models │ │ ├── AccountViewModels.cs │ │ ├── AppointmentConfirmedEvent.cs │ │ ├── AppointmentDTO.cs │ │ ├── AppointmentScheduledEvent.cs │ │ └── IdentityModels.cs │ │ ├── Properties │ │ └── AssemblyInfo.cs │ │ ├── Scripts │ │ ├── _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.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 │ │ ├── Services │ │ └── SendConfirmationEmails.cs │ │ ├── Startup.cs │ │ ├── VetClinicPublic.Web.csproj │ │ ├── Views │ │ ├── Appointment │ │ │ └── Confirm.cshtml │ │ ├── Home │ │ │ └── Index.cshtml │ │ ├── Shared │ │ │ ├── Error.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 └── lib │ ├── common │ └── Common.dll │ └── nunit │ ├── NUnit.VisualStudio.TestAdapter.dll │ ├── nunit-console-runner.dll │ ├── nunit-console-x86.exe │ ├── nunit-console-x86.exe.config │ ├── nunit-console.exe │ ├── nunit-console.exe.config │ ├── nunit.core.dll │ ├── nunit.core.interfaces.dll │ ├── nunit.framework.dll │ ├── nunit.framework.xml │ └── nunit.util.dll ├── Julie Lerman - Domain-Driven Design for the Database-Driven Mind.pdf ├── README.md └── ReadMe..txt /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /FrontDesk/Common.Tests/EntityWithGuidKeyEqualsShould.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using NUnit.Framework; 3 | 4 | namespace Common.Tests 5 | { 6 | [TestFixture] 7 | public class EntityWithGuidKeyEqualsShould 8 | { 9 | public class TestGuidEntity : Entity 10 | { 11 | public TestGuidEntity(Guid id) : base(id) 12 | { 13 | } 14 | } 15 | 16 | [Test] 17 | public void ReturnTrueGivenTwoEntitiesWithSameGuidId() 18 | { 19 | Guid key = Guid.NewGuid(); 20 | var entity1 = new TestGuidEntity(key); 21 | var entity2 = new TestGuidEntity(key); 22 | 23 | Assert.IsTrue(entity1.Equals(entity2)); 24 | } 25 | 26 | [Test] 27 | public void ReturnFalseGivenTwoEntitiesWithDifferentGuidId() 28 | { 29 | var entity1 = new TestGuidEntity(Guid.NewGuid()); 30 | var entity2 = new TestGuidEntity(Guid.NewGuid()); 31 | 32 | Assert.IsFalse(entity1.Equals(entity2)); 33 | } 34 | 35 | [Test] 36 | [ExpectedException(typeof(ArgumentException))] 37 | public void ThrowGivenEmptyGuid() 38 | { 39 | var entity1 = new TestGuidEntity(Guid.Empty); 40 | 41 | Assert.Fail("Should have thrown an exception."); 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /FrontDesk/Common.Tests/EntityWithIntKeyEqualsShould.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using NUnit.Framework; 4 | 5 | namespace Common.Tests 6 | { 7 | [TestFixture] 8 | public class EntityWithIntKeyEqualsShould 9 | { 10 | public class TestIntEntity : Entity 11 | { 12 | public TestIntEntity(int id) 13 | : base(id) 14 | { 15 | } 16 | } 17 | 18 | [Test] 19 | public void ReturnTrueGivenTwoEntitiesWithSameIntegerId() 20 | { 21 | var entity1 = new TestIntEntity(1); 22 | var entity2 = new TestIntEntity(1); 23 | 24 | Assert.IsTrue(entity1.Equals(entity2)); 25 | } 26 | 27 | [Test] 28 | public void ReturnFalseGivenTwoEntitiesWithDifferentIntegerId() 29 | { 30 | var entity1 = new TestIntEntity(1); 31 | var entity2 = new TestIntEntity(2); 32 | 33 | Assert.IsFalse(entity1.Equals(entity2)); 34 | } 35 | 36 | [Test] 37 | [ExpectedException(typeof(ArgumentException))] 38 | public void ThrowGivenZeroId() 39 | { 40 | var entity1 = new TestIntEntity(0); 41 | 42 | Assert.Fail("Should have thrown an exception."); 43 | } 44 | 45 | } 46 | } -------------------------------------------------------------------------------- /FrontDesk/Common/Common.jmconfig: -------------------------------------------------------------------------------- 1 | false -------------------------------------------------------------------------------- /FrontDesk/Common/Contact.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Common 4 | { 5 | public class Contact: Identity 6 | { 7 | public string CompanyName { get; protected set; } 8 | public string EmailAddress { get; protected set; } 9 | public string Phone { get; protected set; } 10 | } 11 | } -------------------------------------------------------------------------------- /FrontDesk/Common/Entity.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | 4 | namespace Common 5 | { 6 | // http://stackoverflow.com/questions/2326288/implementing-ddd-entity-class-in-c-sharp 7 | public abstract class Entity : IEquatable> 8 | { 9 | private readonly TId id; 10 | 11 | protected Entity(TId id) 12 | { 13 | if (object.Equals(id, default(TId))) 14 | { 15 | throw new ArgumentException("The ID cannot be the default value.", "id"); 16 | } 17 | 18 | this.id = id; 19 | } 20 | 21 | public TId Id 22 | { 23 | get { return this.id; } 24 | } 25 | 26 | public override bool Equals(object obj) 27 | { 28 | var entity = obj as Entity; 29 | if (entity != null) 30 | { 31 | return this.Equals(entity); 32 | } 33 | return base.Equals(obj); 34 | } 35 | 36 | public override int GetHashCode() 37 | { 38 | return this.Id.GetHashCode(); 39 | } 40 | 41 | #region IEquatable Members 42 | 43 | public bool Equals(Entity other) 44 | { 45 | if (other == null) 46 | { 47 | return false; 48 | } 49 | return this.Id.Equals(other.Id); 50 | } 51 | 52 | #endregion 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /FrontDesk/Common/FullName.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace Common 4 | { 5 | //no ID because it's a value object 6 | //EF will recognized this as a complex type 7 | //some methods borrowed from Vaughn Vernon IDDD.NET sample 8 | public class FullName:ValueObject 9 | { 10 | public FullName(string firstName, string lastName) 11 | { 12 | FirstName = firstName; 13 | LastName = lastName; 14 | } 15 | 16 | public FullName(FullName fullName) 17 | : this(fullName.FirstName, fullName.LastName) 18 | { 19 | } 20 | 21 | internal FullName() 22 | { 23 | } 24 | 25 | 26 | public string FirstName { get; private set; } 27 | 28 | public string LastName { get; private set; } 29 | 30 | public string AsFormattedName() 31 | { 32 | return this.FirstName + " " + this.LastName; 33 | } 34 | 35 | public FullName WithChangedFirstName(string firstName) 36 | { 37 | return new FullName(firstName, this.LastName); 38 | } 39 | 40 | public FullName WithChangedLastName(string lastName) 41 | { 42 | return new FullName(this.FirstName, lastName); 43 | } 44 | public override string ToString() 45 | { 46 | return "FullName [firstName=" + FirstName + ", lastName=" + LastName + "]"; 47 | } 48 | } 49 | } -------------------------------------------------------------------------------- /FrontDesk/Common/Identity.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Common 4 | { 5 | public abstract class Identity 6 | { 7 | public Guid Id { get; set; } 8 | 9 | public FullName FullName{get;set;} 10 | } 11 | } -------------------------------------------------------------------------------- /FrontDesk/DomainEventsConsole/DomainEventsConsole.jmconfig: -------------------------------------------------------------------------------- 1 | false -------------------------------------------------------------------------------- /FrontDesk/DomainEventsConsole/DomainEventsConsole.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.30110.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DomainEventsConsole", "DomainEventsConsole\DomainEventsConsole.csproj", "{0B897DE5-C806-4CB3-A779-73BEADFAAA73}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {0B897DE5-C806-4CB3-A779-73BEADFAAA73}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {0B897DE5-C806-4CB3-A779-73BEADFAAA73}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {0B897DE5-C806-4CB3-A779-73BEADFAAA73}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {0B897DE5-C806-4CB3-A779-73BEADFAAA73}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /FrontDesk/DomainEventsConsole/DomainEventsConsole/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /FrontDesk/DomainEventsConsole/DomainEventsConsole/ConsoleWriter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | 4 | namespace DomainEventsConsole 5 | { 6 | public static class ConsoleWriter 7 | { 8 | public static void FromUIEventHandlers(string message, params string[] args) 9 | { 10 | Console.ForegroundColor = ConsoleColor.Cyan; 11 | Console.WriteLine(message, args); 12 | Console.ResetColor(); 13 | } 14 | 15 | public static void FromEmailEventHandlers(string message, params string[] args) 16 | { 17 | Console.ForegroundColor = ConsoleColor.Yellow; 18 | Console.WriteLine(message, args); 19 | Console.ResetColor(); 20 | } 21 | 22 | public static void FromRepositories(string message, params string[] args) 23 | { 24 | Console.ForegroundColor = ConsoleColor.Red; 25 | Console.WriteLine(message, args); 26 | Console.ResetColor(); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /FrontDesk/DomainEventsConsole/DomainEventsConsole/Events/AppointmentConfirmed.cs: -------------------------------------------------------------------------------- 1 | using DomainEventsConsole.Interfaces; 2 | using DomainEventsConsole.Model; 3 | using System; 4 | 5 | namespace DomainEventsConsole.Events 6 | { 7 | public class AppointmentConfirmed : IDomainEvent 8 | { 9 | public Appointment Appointment { get; set; } 10 | public System.DateTime DateOccurred { get; private set; } 11 | 12 | public AppointmentConfirmed(Appointment appointment, DateTime dateConfirmed) 13 | { 14 | this.Appointment = appointment; 15 | this.DateOccurred = dateConfirmed; 16 | } 17 | public AppointmentConfirmed(Appointment appointment) : this(appointment, DateTime.Now) 18 | { 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /FrontDesk/DomainEventsConsole/DomainEventsConsole/Events/AppointmentCreated.cs: -------------------------------------------------------------------------------- 1 | using DomainEventsConsole.Interfaces; 2 | using DomainEventsConsole.Model; 3 | using System; 4 | 5 | namespace DomainEventsConsole.Events 6 | { 7 | public class AppointmentCreated : IDomainEvent 8 | { 9 | public Appointment Appointment { get; set; } 10 | public System.DateTime DateOccurred { get; private set; } 11 | 12 | public AppointmentCreated(Appointment appointment, DateTime dateCreated) 13 | { 14 | this.Appointment = appointment; 15 | this.DateOccurred = dateCreated; 16 | } 17 | 18 | public AppointmentCreated(Appointment appointment) : this(appointment, DateTime.Now) 19 | { 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /FrontDesk/DomainEventsConsole/DomainEventsConsole/Events/DomainEventsV1.cs: -------------------------------------------------------------------------------- 1 | using DomainEventsConsole.Interfaces; 2 | using StructureMap; 3 | 4 | namespace DomainEventsConsole.Events 5 | { 6 | public static class DomainEventsV1 7 | { 8 | static DomainEventsV1() 9 | { 10 | Container = StructureMap.ObjectFactory.Container; 11 | } 12 | 13 | public static IContainer Container { get; set; } 14 | public static void Raise(T args) where T : IDomainEvent 15 | { 16 | foreach (var handler in Container.GetAllInstances>()) 17 | { 18 | handler.Handle(args); 19 | } 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /FrontDesk/DomainEventsConsole/DomainEventsConsole/Handlers/NotifyUIAppointmentConfirmed.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using DomainEventsConsole.Events; 3 | using DomainEventsConsole.Interfaces; 4 | 5 | namespace DomainEventsConsole.Handlers 6 | { 7 | public class NotifyUIAppointmentConfirmed : IHandle 8 | { 9 | public void Handle(AppointmentConfirmed args) 10 | { 11 | ConsoleWriter.FromUIEventHandlers("[UI] User Interface informed appointment for {0} confirmed at {1}", 12 | args.Appointment.EmailAddress, 13 | args.Appointment.ConfirmationReceivedDate.ToString()); 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /FrontDesk/DomainEventsConsole/DomainEventsConsole/Handlers/NotifyUIAppointmentCreated.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using DomainEventsConsole.Events; 3 | using DomainEventsConsole.Interfaces; 4 | 5 | namespace DomainEventsConsole.Handlers 6 | { 7 | public class NotifyUIAppointmentCreated : IHandle 8 | { 9 | public void Handle(AppointmentCreated args) 10 | { 11 | ConsoleWriter.FromUIEventHandlers("[UI] User Interface informed appointment created for {0}", args.Appointment.EmailAddress); 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /FrontDesk/DomainEventsConsole/DomainEventsConsole/Handlers/NotifyUserAppointmentCreated.cs: -------------------------------------------------------------------------------- 1 | using DomainEventsConsole.Events; 2 | using DomainEventsConsole.Interfaces; 3 | using System; 4 | using System.Linq; 5 | 6 | namespace DomainEventsConsole.Handlers 7 | { 8 | public class NotifyUserAppointmentCreated : IHandle 9 | { 10 | public void Handle(AppointmentCreated args) 11 | { 12 | ConsoleWriter.FromEmailEventHandlers("[EMAIL] Notification email sent to {0}", args.Appointment.EmailAddress); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /FrontDesk/DomainEventsConsole/DomainEventsConsole/Interfaces/IDomainEvent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | 4 | namespace DomainEventsConsole.Interfaces 5 | { 6 | public interface IDomainEvent 7 | { 8 | DateTime DateOccurred { get; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /FrontDesk/DomainEventsConsole/DomainEventsConsole/Interfaces/IEntity.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace DomainEventsConsole.Interfaces 4 | { 5 | public interface IEntity 6 | { 7 | Guid Id { get; } 8 | } 9 | } -------------------------------------------------------------------------------- /FrontDesk/DomainEventsConsole/DomainEventsConsole/Interfaces/IHandle.cs: -------------------------------------------------------------------------------- 1 | namespace DomainEventsConsole.Interfaces 2 | { 3 | public interface IHandle where T : IDomainEvent 4 | { 5 | void Handle(T args); 6 | } 7 | } -------------------------------------------------------------------------------- /FrontDesk/DomainEventsConsole/DomainEventsConsole/Interfaces/IRepository.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace DomainEventsConsole.Interfaces 5 | { 6 | public interface IRepository where TEntity : IEntity 7 | { 8 | TEntity GetById(Guid id); 9 | 10 | IList GetAll(); 11 | 12 | void Save(TEntity entity); 13 | } 14 | } -------------------------------------------------------------------------------- /FrontDesk/DomainEventsConsole/DomainEventsConsole/Model/Appointment.cs: -------------------------------------------------------------------------------- 1 | using DomainEventsConsole.Events; 2 | using DomainEventsConsole.Interfaces; 3 | using System; 4 | using System.Linq; 5 | 6 | namespace DomainEventsConsole.Model 7 | { 8 | public class Appointment : IEntity 9 | { 10 | public Guid Id { get; private set; } 11 | public string EmailAddress { get; private set; } 12 | public DateTime? ConfirmationReceivedDate { get; private set; } 13 | 14 | protected Appointment() : this(Guid.NewGuid()) 15 | { 16 | } 17 | 18 | public Appointment(Guid id) 19 | { 20 | this.Id = id; 21 | } 22 | 23 | public static Appointment Create(string emailAddress) 24 | { 25 | Console.WriteLine("Appointment::Create()"); 26 | 27 | var appointment = new Appointment(); 28 | appointment.EmailAddress = emailAddress; 29 | 30 | DomainEvents.Raise(new AppointmentCreated(appointment)); 31 | 32 | return appointment; 33 | } 34 | 35 | public void Confirm(DateTime dateConfirmed) 36 | { 37 | ConfirmationReceivedDate = dateConfirmed; 38 | 39 | DomainEvents.Raise(new AppointmentConfirmed(this)); 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /FrontDesk/DomainEventsConsole/DomainEventsConsole/Repositories/Repository.cs: -------------------------------------------------------------------------------- 1 | using DomainEventsConsole.Interfaces; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | 6 | namespace DomainEventsConsole.Repositories 7 | { 8 | public class Repository : IRepository where TEntity : IEntity 9 | { 10 | private readonly Dictionary entities = new Dictionary(); 11 | public TEntity GetById(Guid id) 12 | { 13 | return entities[id]; 14 | } 15 | 16 | public IList GetAll() 17 | { 18 | return (IList)entities.Values.ToList(); 19 | } 20 | 21 | public void Save(TEntity entity) 22 | { 23 | entities[entity.Id] = entity; 24 | ConsoleWriter.FromRepositories("[DATABASE] Saved entity {0}", entity.Id.ToString()); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /FrontDesk/DomainEventsConsole/DomainEventsConsole/Services/AppointmentSchedulingService.cs: -------------------------------------------------------------------------------- 1 | using DomainEventsConsole.Interfaces; 2 | using DomainEventsConsole.Model; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace DomainEventsConsole.Services 10 | { 11 | public class AppointmentSchedulingService 12 | { 13 | private IRepository _apptRepository; 14 | public AppointmentSchedulingService(IRepository apptRepository) 15 | { 16 | _apptRepository = apptRepository; 17 | } 18 | 19 | public void ScheduleAppointment(string email, DateTime appointmentTime) 20 | { 21 | var appointment = Appointment.Create(email); 22 | _apptRepository.Save(appointment); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /FrontDesk/DomainEventsConsole/DomainEventsConsole/UnitTests/AppointmentCreateShould.cs: -------------------------------------------------------------------------------- 1 | using DomainEventsConsole.Events; 2 | using DomainEventsConsole.Model; 3 | using NUnit.Framework; 4 | using System; 5 | using System.Linq; 6 | 7 | namespace DomainEventsConsole.UnitTests 8 | { 9 | [TestFixture] 10 | public class AppointmentCreateShould 11 | { 12 | [Test] 13 | public void RaiseAppointmentCreatedEvent() 14 | { 15 | string testCustomerEmail = "foo@bar.com"; 16 | string notificationSentToEmail = ""; 17 | DomainEvents.Register(ac => notificationSentToEmail = ac.Appointment.EmailAddress); 18 | 19 | var appointment = Appointment.Create(testCustomerEmail); 20 | 21 | Assert.AreEqual(testCustomerEmail, notificationSentToEmail); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /FrontDesk/DomainEventsConsole/DomainEventsConsole/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/.nuget/NuGet.Config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/.nuget/NuGet.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/.nuget/NuGet.exe -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/.nuget/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/AppointmentScheduling.Core/ClassDiagram1.cd: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/AppointmentScheduling.Core/ClassDiagram2.cd: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/AppointmentScheduling.Core/ClassDiagram3.cd: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/AppointmentScheduling.Core/ClassDiagram4.cd: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/AppointmentScheduling.Core/ClassDiagram5.cd: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/AppointmentScheduling.Core/ClassDiagram6.cd: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/AppointmentScheduling.Core/Interfaces/IApplicationSettings.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace AppointmentScheduling.Core.Interfaces 4 | { 5 | public interface IApplicationSettings 6 | { 7 | int ClinicId { get; } 8 | DateTime TestDate { get; } 9 | } 10 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/AppointmentScheduling.Core/Interfaces/IAppointmentDTORepository.cs: -------------------------------------------------------------------------------- 1 | using AppointmentScheduling.Core.Model; 2 | using AppointmentScheduling.Core.Model.ScheduleAggregate; 3 | using System; 4 | using System.Linq; 5 | 6 | namespace AppointmentScheduling.Core.Interfaces 7 | { 8 | public interface IAppointmentDTORepository 9 | { 10 | AppointmentDTO GetFromAppointment(Appointment appointment); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/AppointmentScheduling.Core/Interfaces/IMessagePublisher.cs: -------------------------------------------------------------------------------- 1 | using FrontDesk.SharedKernel.Interfaces; 2 | 3 | namespace AppointmentScheduling.Core.Interfaces 4 | { 5 | public interface IMessagePublisher 6 | { 7 | void Publish(IApplicationEvent applicationEvent); 8 | } 9 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/AppointmentScheduling.Core/Interfaces/IRepository.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace AppointmentScheduling.Core.Interfaces 4 | { 5 | //public interface IRepository 6 | //{ 7 | // T GetById(int id); 8 | // void Add(T entity); 9 | // void Remove(T entity); 10 | // IEnumerable List(); 11 | //} 12 | } 13 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/AppointmentScheduling.Core/Interfaces/IScheduleRepository.cs: -------------------------------------------------------------------------------- 1 | using AppointmentScheduling.Core.Model.ScheduleAggregate; 2 | using System; 3 | using System.Linq; 4 | 5 | namespace AppointmentScheduling.Core.Interfaces 6 | { 7 | /// 8 | /// Note: This repository will save changes with each method 9 | /// 10 | public interface IScheduleRepository 11 | { 12 | Schedule GetScheduleForDate(int clinicId, DateTime date); 13 | void Update(Schedule schedule); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/AppointmentScheduling.Core/Model/ApplicationEvents/AppointmentConfirmedEvent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using FrontDesk.SharedKernel.Interfaces; 3 | 4 | namespace AppointmentScheduling.Core.Model.ApplicationEvents 5 | { 6 | public class AppointmentConfirmedEvent : IApplicationEvent 7 | { 8 | public AppointmentConfirmedEvent() 9 | { 10 | this.Id = Guid.NewGuid(); 11 | DateTimeEventOccurred = DateTime.Now; 12 | } 13 | 14 | public Guid Id { get; private set; } 15 | public DateTime DateTimeEventOccurred { get; set; } 16 | public Guid AppointmentId { get; set; } 17 | public string EventType 18 | { 19 | get 20 | { 21 | return "AppointmentConfirmedEvent"; 22 | } 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/AppointmentScheduling.Core/Model/ApplicationEvents/AppointmentScheduledEvent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using FrontDesk.SharedKernel.Interfaces; 3 | 4 | namespace AppointmentScheduling.Core.Model.ApplicationEvents 5 | { 6 | public class AppointmentScheduledEvent : IApplicationEvent 7 | { 8 | public AppointmentScheduledEvent(AppointmentDTO appointment) : this() 9 | { 10 | AppointmentScheduled = appointment; 11 | } 12 | 13 | public AppointmentScheduledEvent() 14 | { 15 | DateTimeEventOccurred = DateTime.Now; 16 | } 17 | 18 | public DateTime DateTimeEventOccurred { get; private set; } 19 | public AppointmentDTO AppointmentScheduled { get; private set; } 20 | public string EventType 21 | { 22 | get 23 | { 24 | return "AppointmentScheduledEvent"; 25 | } 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/AppointmentScheduling.Core/Model/AppointmentDTO.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | 4 | namespace AppointmentScheduling.Core.Model 5 | { 6 | public class AppointmentDTO 7 | { 8 | public Guid AppointmentId { get; set; } 9 | public string ClientName { get; set; } 10 | public string ClientEmailAddress { get; set; } 11 | public string PatientName { get; set; } 12 | public string DoctorName { get; set; } 13 | public string AppointmentType { get; set; } 14 | public DateTime Start { get; set; } 15 | public DateTime End { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/AppointmentScheduling.Core/Model/Events/AppointmentConfirmedEvent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using AppointmentScheduling.Core.Model.ScheduleAggregate; 3 | using FrontDesk.SharedKernel.Interfaces; 4 | 5 | namespace AppointmentScheduling.Core.Model.Events 6 | { 7 | public class AppointmentConfirmedEvent : IDomainEvent 8 | { 9 | public AppointmentConfirmedEvent(Appointment appointment) : this() 10 | { 11 | AppointmentUpdated = appointment; 12 | } 13 | 14 | public AppointmentConfirmedEvent() 15 | { 16 | this.Id = Guid.NewGuid(); 17 | DateTimeEventOccurred = DateTime.Now; 18 | } 19 | 20 | public Guid Id { get; private set; } 21 | 22 | public DateTime DateTimeEventOccurred { get; private set; } 23 | 24 | public Appointment AppointmentUpdated { get; private set; } 25 | } 26 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/AppointmentScheduling.Core/Model/Events/AppointmentScheduledEvent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using AppointmentScheduling.Core.Model.ScheduleAggregate; 3 | using FrontDesk.SharedKernel.Interfaces; 4 | 5 | namespace AppointmentScheduling.Core.Model.Events 6 | { 7 | public class AppointmentScheduledEvent : IDomainEvent 8 | { 9 | public AppointmentScheduledEvent(Appointment appointment) : this() 10 | { 11 | AppointmentScheduled = appointment; 12 | } 13 | 14 | public AppointmentScheduledEvent() 15 | { 16 | this.Id = Guid.NewGuid(); 17 | DateTimeEventOccurred = DateTime.Now; 18 | } 19 | 20 | public Guid Id { get; private set; } 21 | 22 | public DateTime DateTimeEventOccurred { get; private set; } 23 | 24 | public Appointment AppointmentScheduled { get; private set; } 25 | } 26 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/AppointmentScheduling.Core/Model/Events/AppointmentUpdatedEvent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using FrontDesk.SharedKernel.Interfaces; 3 | using AppointmentScheduling.Core.Model.ScheduleAggregate; 4 | 5 | namespace AppointmentScheduling.Core.Model.Events 6 | { 7 | public class AppointmentUpdatedEvent : IDomainEvent 8 | { 9 | public AppointmentUpdatedEvent(Appointment appointment) 10 | : this() 11 | { 12 | AppointmentUpdated = appointment; 13 | } 14 | public AppointmentUpdatedEvent() 15 | { 16 | this.Id = Guid.NewGuid(); 17 | DateTimeEventOccurred = DateTime.Now; 18 | } 19 | 20 | public Guid Id { get; private set; } 21 | public DateTime DateTimeEventOccurred { get; private set; } 22 | public Appointment AppointmentUpdated { get; private set; } 23 | } 24 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/AppointmentScheduling.Core/Model/ScheduleAggregate/AppointmentType.cs: -------------------------------------------------------------------------------- 1 | namespace AppointmentScheduling.Core.Model.ScheduleAggregate 2 | { 3 | public class AppointmentType 4 | { 5 | public int Id { get; set; } 6 | public string Name { get; set; } 7 | public string Code { get; set; } 8 | public int Duration { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/AppointmentScheduling.Core/Model/ScheduleAggregate/Client.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using FrontDesk.SharedKernel; 3 | 4 | namespace AppointmentScheduling.Core.Model.ScheduleAggregate 5 | { 6 | public class Client : Entity 7 | { 8 | public string FullName { get; private set; } 9 | public IList Patients { get; private set; } 10 | 11 | public Client(int id) 12 | { 13 | this.Id = id; 14 | Patients = new List(); 15 | } 16 | 17 | protected Client() //required for EF 18 | { 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/AppointmentScheduling.Core/Model/ScheduleAggregate/Doctor.cs: -------------------------------------------------------------------------------- 1 | using FrontDesk.SharedKernel; 2 | 3 | namespace AppointmentScheduling.Core.Model.ScheduleAggregate 4 | { 5 | public class Doctor : Entity 6 | { 7 | public virtual string Name { get; set; } 8 | 9 | public Doctor(int id) 10 | : base(id) 11 | { 12 | } 13 | 14 | private Doctor() 15 | { 16 | 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/AppointmentScheduling.Core/Model/ScheduleAggregate/Patient.cs: -------------------------------------------------------------------------------- 1 | using AppointmentScheduling.Core.Model.ValueObjects; 2 | using FrontDesk.SharedKernel; 3 | using FrontDesk.SharedKernel.Enums; 4 | 5 | namespace AppointmentScheduling.Core.Model.ScheduleAggregate 6 | { 7 | public class Patient : Entity 8 | { 9 | public int ClientId { get; private set; } 10 | public string Name { get; private set; } 11 | public Gender Gender { get; private set; } 12 | public AnimalType AnimalType { get; private set; } 13 | public int? PreferredDoctorId { get; set; } 14 | 15 | public Patient(int id) 16 | : base(id) 17 | { 18 | } 19 | 20 | private Patient() 21 | { 22 | 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/AppointmentScheduling.Core/Model/ScheduleAggregate/Room.cs: -------------------------------------------------------------------------------- 1 | using FrontDesk.SharedKernel; 2 | 3 | namespace AppointmentScheduling.Core.Model.ScheduleAggregate 4 | { 5 | public class Room : Entity 6 | { 7 | public virtual string Name { get; set; } 8 | 9 | public Room(int id) 10 | : base(id) 11 | { 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/AppointmentScheduling.Core/Model/ValueObjects/AnimalType.cs: -------------------------------------------------------------------------------- 1 | using FrontDesk.SharedKernel; 2 | using System; 3 | using System.Linq; 4 | 5 | namespace AppointmentScheduling.Core.Model.ValueObjects 6 | { 7 | public class AnimalType : ValueObject 8 | { 9 | public string Species { get; private set; } 10 | public string Breed { get; private set; } 11 | 12 | public AnimalType() 13 | { 14 | 15 | } 16 | public AnimalType(string species, string breed) 17 | { 18 | this.Species = species; 19 | this.Breed = breed; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/AppointmentScheduling.Core/Services/EmailConfirmationHandler.cs: -------------------------------------------------------------------------------- 1 | using AppointmentScheduling.Core.Interfaces; 2 | using AppointmentScheduling.Core.Model.ApplicationEvents; 3 | using FrontDesk.SharedKernel.Interfaces; 4 | using System; 5 | using System.Linq; 6 | 7 | namespace AppointmentScheduling.Core.Services 8 | { 9 | public class EmailConfirmationHandler : IHandle 10 | { 11 | private readonly IScheduleRepository _scheduleRepository; 12 | 13 | private readonly IApplicationSettings _settings; 14 | 15 | public EmailConfirmationHandler(IScheduleRepository scheduleRepository, IApplicationSettings settings) 16 | { 17 | this._scheduleRepository = scheduleRepository; 18 | this._settings = settings; 19 | } 20 | 21 | public void Handle(AppointmentConfirmedEvent appointmentConfirmedEvent) 22 | { 23 | // Note: In this demo this only works for appointments scheduled on TestDate 24 | var schedule = _scheduleRepository.GetScheduleForDate(_settings.ClinicId, _settings.TestDate); 25 | 26 | var appointmentToConfirm = schedule.Appointments.FirstOrDefault(a => a.Id == appointmentConfirmedEvent.AppointmentId); 27 | 28 | appointmentToConfirm.Confirm(appointmentConfirmedEvent.DateTimeEventOccurred); 29 | 30 | _scheduleRepository.Update(schedule); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/AppointmentScheduling.Data/App.config: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/AppointmentScheduling.Data/DemoOnlyPersistenceModel/Appointment.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using FrontDesk.SharedKernel; 3 | 4 | namespace AppointmentScheduling.Data.PersistenceModel 5 | { 6 | public class Appointment 7 | { 8 | public Guid Id { get; set; } 9 | public Guid ScheduleId { get; set; } 10 | public int ClientId { get; set; } 11 | public int PatientId { get; set; } 12 | public int RoomId { get; set; } 13 | public int? DoctorId { get; set; } 14 | public DateTimeRange TimeRange { get; set; } 15 | public int AppointmentTypeId { get; set; } 16 | public string Title { get; set; } 17 | public DateTime? DateTimeConfirmed { get; set; } 18 | } 19 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/AppointmentScheduling.Data/DemoOnlyPersistenceModel/AppointmentType.cs: -------------------------------------------------------------------------------- 1 | namespace AppointmentScheduling.Data.PersistenceModel 2 | { 3 | public class AppointmentType 4 | { 5 | public int Id { get; set; } 6 | public string Name { get; set; } 7 | public string Code { get; set; } 8 | public int Duration { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/AppointmentScheduling.Data/DemoOnlyPersistenceModel/Client.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace AppointmentScheduling.Data.PersistenceModel 4 | { 5 | public class Client 6 | { 7 | public Client() 8 | { 9 | Patients = new List(); 10 | } 11 | 12 | public int Id { get; set; } 13 | public string FullName { get; set; } 14 | public string Salutation { get; set; } 15 | public string EmailAddress { get; set; } 16 | public string PreferredName { get; set; } 17 | public int? PreferredDoctorId { get; set; } 18 | 19 | public IList Patients { get; private set; } 20 | } 21 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/AppointmentScheduling.Data/DemoOnlyPersistenceModel/Doctor.cs: -------------------------------------------------------------------------------- 1 | namespace AppointmentScheduling.Data.PersistenceModel 2 | { 3 | public class Doctor 4 | { 5 | public int Id { get; set; } 6 | public string Name { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/AppointmentScheduling.Data/DemoOnlyPersistenceModel/Patient.cs: -------------------------------------------------------------------------------- 1 | using AppointmentScheduling.Core.Model.ValueObjects; 2 | using FrontDesk.SharedKernel.Enums; 3 | 4 | namespace AppointmentScheduling.Data.PersistenceModel 5 | { 6 | public class Patient 7 | { 8 | public int Id { get; set; } 9 | public int ClientId { get; set; } 10 | public string Name { get; set; } 11 | public Gender Gender { get; set; } 12 | public AnimalType AnimalType { get; set; } 13 | public int? PreferredDoctorId { get; set; } 14 | 15 | } 16 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/AppointmentScheduling.Data/DemoOnlyPersistenceModel/Room.cs: -------------------------------------------------------------------------------- 1 | namespace AppointmentScheduling.Data.PersistenceModel 2 | { 3 | public class Room 4 | { 5 | public int Id { get; set; } 6 | public string Name { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/AppointmentScheduling.Data/DemoOnlyPersistenceModel/Schedule.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace AppointmentScheduling.Data.PersistenceModel 5 | { 6 | public class Schedule 7 | { 8 | public Guid Id { get; set; } 9 | public int ClinicId { get; set; } 10 | public ICollection Appointments { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/AppointmentScheduling.Data/SchedulingPersistenceContext.cs: -------------------------------------------------------------------------------- 1 | using System.Data.Entity; 2 | using AppointmentScheduling.Data.PersistenceModel; 3 | 4 | namespace AppointmentScheduling.Data 5 | { 6 | public class SchedulingPersistenceContext : DbContext 7 | { 8 | public SchedulingPersistenceContext() 9 | : base("name=VetOfficeContext") 10 | { 11 | } 12 | public DbSet Schedules { get; set; } 13 | public DbSet Clients { get; set; } 14 | public DbSet Doctors { get; set; } 15 | public DbSet Patients { get; set; } 16 | public DbSet Appointments { get; set; } 17 | public DbSet AppointmentTypes { get; set; } 18 | 19 | protected override void OnModelCreating(DbModelBuilder modelBuilder) 20 | { 21 | modelBuilder.Entity().HasKey(c => c.Id); 22 | base.OnModelCreating(modelBuilder); 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/AppointmentScheduling.Data/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/AppointmentScheduling.IntegrationTests/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/AppointmentScheduling.IntegrationTests/Data/ScheduleRepositoryShould.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Data.Entity; 3 | using System.Linq; 4 | using AppointmentScheduling.Data; 5 | using AppointmentScheduling.Data.Repositories; 6 | using NUnit.Framework; 7 | 8 | namespace AppointmentScheduling.IntegrationTests.Data 9 | { 10 | [TestFixture] 11 | public class ScheduleRepositoryShould 12 | { 13 | private int testClinicId = 1; 14 | private DateTime testDateWithNoAppointments = new DateTime(2001, 1, 1); 15 | private DateTime testDateWithAppointments = new DateTime(2014, 6, 9); 16 | 17 | public ScheduleRepositoryShould() 18 | { 19 | Database.SetInitializer(null); 20 | } 21 | 22 | [Test] 23 | public void NotReturnNullAppointmentsCollectionInScheduleTypeIfNoAppointmentsFound() 24 | { 25 | var repo = new ScheduleRepository(new SchedulingContext()); 26 | Assert.IsNotNull(repo.GetScheduleForDate(testClinicId, testDateWithNoAppointments).Appointments); 27 | } 28 | 29 | [Test] 30 | public void ReturnAppointmentsFromGetScheduledAppointmentsForDate() 31 | { 32 | var repo = new ScheduleRepository(new SchedulingContext()); 33 | Assert.IsNotNull(repo.GetScheduleForDate(testClinicId, testDateWithAppointments).Appointments); 34 | } 35 | 36 | 37 | } 38 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/AppointmentScheduling.IntegrationTests/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/AppointmentScheduling.UnitTests/Model/AppointmentShould.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using NUnit.Framework; 3 | using AppointmentScheduling.Core.Model.ScheduleAggregate; 4 | using FrontDesk.SharedKernel; 5 | 6 | namespace AppointmentScheduling.UnitTests.Model 7 | { 8 | [TestFixture] 9 | public class AppointmentShould 10 | { 11 | [Test] 12 | public void BeAnEntity() 13 | { 14 | var appointment = new Appointment(Guid.NewGuid()); 15 | 16 | Assert.IsInstanceOf>(appointment); 17 | } 18 | 19 | [Test] //move to sharedkerneltests when they are created 20 | public void DateTimeRangeShouldReturnCorrectDuration() 21 | { 22 | var thirtyMinutes = new TimeSpan(0, 0, 30, 0); 23 | 24 | var range = new DateTimeRange(DateTime.Now, thirtyMinutes); 25 | Assert.AreEqual(thirtyMinutes.Minutes, range.DurationInMinutes()); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/AppointmentScheduling.UnitTests/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/Build.bat: -------------------------------------------------------------------------------- 1 | %systemroot%\Microsoft.Net\Framework\v4.0.30319\MSBuild.exe build.proj /t:%* 2 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/Build.proj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | FrontDesk 5 | FrontDesk 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/ClickToBuild.bat: -------------------------------------------------------------------------------- 1 | build.bat unittests & pause 2 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/ClientPatientManagement.Core/ClassDiagram1.cd: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/ClientPatientManagement.Core/Interfaces/IEntity.cs: -------------------------------------------------------------------------------- 1 | namespace ClientPatientManagement.Core.Interfaces 2 | { 3 | public interface IEntity 4 | { 5 | int Id { get; } 6 | } 7 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/ClientPatientManagement.Core/Interfaces/IRepository.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | namespace ClientPatientManagement.Core.Interfaces 6 | { 7 | public interface IRepository where TEntity : IEntity 8 | { 9 | IEnumerable List(); 10 | TEntity GetById(int id); 11 | void Insert(TEntity entity); 12 | void Update(TEntity entity); 13 | void Delete(int id); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/ClientPatientManagement.Core/Model/Client.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using ClientPatientManagement.Core.Interfaces; 4 | 5 | namespace ClientPatientManagement.Core.Model 6 | { 7 | public class Client : IEntity 8 | { 9 | public Client() 10 | { 11 | Patients = new List(); 12 | } 13 | 14 | public int Id { get; set; } 15 | public string FullName { get; set; } 16 | public string EmailAddress { get; set; } 17 | public string Salutation { get; set; } 18 | public string PreferredName { get; set; } 19 | public int? PreferredDoctorId { get; set; } 20 | 21 | public IList Patients { get; private set; } 22 | } 23 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/ClientPatientManagement.Core/Model/Doctor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using ClientPatientManagement.Core.Interfaces; 4 | 5 | namespace ClientPatientManagement.Core.Model 6 | { 7 | public class Doctor : IEntity 8 | { 9 | public int Id { get; set; } 10 | public string Name { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/ClientPatientManagement.Core/Model/Patient.cs: -------------------------------------------------------------------------------- 1 | using ClientPatientManagement.Core.Interfaces; 2 | using FrontDesk.SharedKernel.Enums; 3 | 4 | namespace ClientPatientManagement.Core.Model 5 | { 6 | public class Patient : IEntity 7 | { 8 | public Patient(Client owner) : this() 9 | { 10 | ClientId = owner.Id; 11 | Owner = owner; 12 | PreferredDoctorId = Owner.PreferredDoctorId; 13 | } 14 | 15 | public Patient() 16 | { 17 | } 18 | 19 | public int Id { get; set; } 20 | public Client Owner { get; private set; } 21 | public int ClientId { get; set; } 22 | public string Name { get; set; } 23 | public Gender Gender { get; set; } 24 | public int? PreferredDoctorId { get; set; } 25 | } 26 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/ClientPatientManagement.Core/Model/Room.cs: -------------------------------------------------------------------------------- 1 | using ClientPatientManagement.Core.Interfaces; 2 | 3 | namespace ClientPatientManagement.Core.Model 4 | { 5 | public class Room : IEntity 6 | { 7 | public int Id { get; set; } 8 | public string Name { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/ClientPatientManagement.Data/App.config: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/ClientPatientManagement.Data/NonRoot.cs: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/ClientPatientManagement.Data/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/ClientPatientManagement.IntegrationTests/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/ClientPatientManagement.IntegrationTests/CrudContextShould.cs: -------------------------------------------------------------------------------- 1 | using System.Data.Entity; 2 | using System.Linq; 3 | using ClientPatientManagement.Data; 4 | using NUnit.Framework; 5 | 6 | namespace ClientPatientManagement.IntegrationTests.Data 7 | { 8 | [TestFixture] 9 | public class CrudContextShould 10 | { 11 | public CrudContextShould() 12 | { 13 | Database.SetInitializer(null); 14 | } 15 | [Test] 16 | public void GetClientList() 17 | { 18 | using (var db = new CrudContext()) 19 | { 20 | Assert.IsNotEmpty(db.Clients.ToList()); 21 | } 22 | } 23 | 24 | [Test] 25 | public void ReturnMaintenanceClientType() 26 | { 27 | using (var db = new CrudContext()) 28 | { 29 | Assert.IsInstanceOf < ClientPatientManagement.Core.Model.Client > (db.Clients.FirstOrDefault()); 30 | } 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/ClientPatientManagement.IntegrationTests/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/ClientPatientManagement.UnitTests/Model/PatientShould.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using FrontDesk.SharedKernel.Enums; 3 | using NUnit.Framework; 4 | using ClientPatientManagement.Core.Model; 5 | 6 | namespace FrontDesk.UnitTests.Model 7 | { 8 | [TestFixture] 9 | public class PatientShould 10 | { 11 | [Test] 12 | public void HaveAFewProperties() 13 | { 14 | var testName = "Darwin"; 15 | var testGender = Gender.Male; 16 | var patient = new Patient(new Client()) 17 | { 18 | Name = testName, 19 | Gender = testGender 20 | }; 21 | 22 | Assert.AreEqual(testName, patient.Name); 23 | Assert.AreEqual(testGender, patient.Gender); 24 | } 25 | 26 | [Test] 27 | public void HaveAnOwner() 28 | { 29 | var client = new Client(); 30 | var patient = new Patient(client); 31 | 32 | Assert.AreEqual(client, patient.Owner); 33 | 34 | } 35 | 36 | [Test] 37 | public void HavePreferredDoctorDefaultToClientPreferredDoctor() 38 | { 39 | var client = new Client(); 40 | var doctor = new Doctor(); 41 | client.PreferredDoctorId = doctor.Id; 42 | 43 | var patient = new Patient(client); 44 | 45 | Assert.AreEqual(client.PreferredDoctorId, patient.PreferredDoctorId); 46 | 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/DDD Session Tests/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/DDD Session Tests/Stylesheet1.css: -------------------------------------------------------------------------------- 1 | body 2 | { 3 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/DDD Session Tests/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/DDD Session Tests/sampson.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/DDD Session Tests/sampson.gif -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/DomainEvents.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | /// 4 | /// http://msdn.microsoft.com/en-gb/magazine/ee236415.aspx#id0400046 5 | /// 6 | public static class DomainEvents 7 | { 8 | [ThreadStatic] 9 | private static List actions; 10 | static DomainEvents() 11 | { 12 | Container = StructureMap.ObjectFactory.Container; 13 | } 14 | public static IContainer Container { get; set; } 15 | 16 | public static void Register(Action callback) where T : IDomainEvent 17 | { 18 | if (actions == null) 19 | { 20 | actions = new List(); 21 | } 22 | actions.Add(callback); 23 | } 24 | 25 | public static void ClearCallbacks() 26 | { 27 | actions = null; 28 | } 29 | 30 | public static void Raise(T args) where T : IDomainEvent 31 | { 32 | foreach (var handler in Container.GetAllInstances>()) 33 | { 34 | handler.Handle(args); 35 | } 36 | 37 | if (actions != null) 38 | { 39 | foreach (var action in actions) 40 | { 41 | if (action is Action) 42 | { 43 | ((Action)action)(args); 44 | } 45 | } 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.SharedKernel/ClassDiagram1.cd: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.SharedKernel/ClassDiagram2.cd: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.SharedKernel/Enums/Gender.cs: -------------------------------------------------------------------------------- 1 | namespace FrontDesk.SharedKernel.Enums 2 | { 3 | public enum Gender 4 | { 5 | Female = 1, 6 | Male = 2 7 | } 8 | 9 | public enum TrackingState 10 | { 11 | Unchanged = 0, 12 | Added = 1, 13 | Modified = 2, 14 | Deleted = 3 15 | } 16 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.SharedKernel/Guard.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | 4 | namespace FrontDesk.SharedKernel 5 | { 6 | public class Guard 7 | { 8 | public static void ForLessEqualZero(int value, string parameterName) 9 | { 10 | if (value <= 0) 11 | { 12 | throw new ArgumentOutOfRangeException(parameterName); 13 | } 14 | } 15 | 16 | public static void ForPrecedesDate(DateTime value, DateTime dateToPrecede, string parameterName) 17 | { 18 | if (value >= dateToPrecede) 19 | { 20 | throw new ArgumentOutOfRangeException(parameterName); 21 | } 22 | } 23 | 24 | public static void ForNullOrEmpty(string value, string parameterName) 25 | { 26 | if (String.IsNullOrEmpty(value)) 27 | { 28 | throw new ArgumentOutOfRangeException(parameterName); 29 | } 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.SharedKernel/Interfaces/IApplicationEvent.cs: -------------------------------------------------------------------------------- 1 | namespace FrontDesk.SharedKernel.Interfaces 2 | { 3 | public interface IApplicationEvent : IDomainEvent 4 | { 5 | string EventType { get; } 6 | } 7 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.SharedKernel/Interfaces/IDomainEvent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | 4 | namespace FrontDesk.SharedKernel.Interfaces 5 | { 6 | public interface IDomainEvent 7 | { 8 | DateTime DateTimeEventOccurred { get; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.SharedKernel/Interfaces/IHandle.cs: -------------------------------------------------------------------------------- 1 | namespace FrontDesk.SharedKernel.Interfaces 2 | { 3 | public interface IHandle where T : IDomainEvent 4 | { 5 | void Handle(T args); 6 | } 7 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.SharedKernel/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/App_Start/FilterConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | using System.Web.Mvc; 3 | 4 | namespace FrontDesk.Web 5 | { 6 | public class FilterConfig 7 | { 8 | public static void RegisterGlobalFilters(GlobalFilterCollection filters) 9 | { 10 | filters.Add(new HandleErrorAttribute()); 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/App_Start/RouteConfig.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Web.Mvc; 4 | using System.Web.Routing; 5 | 6 | namespace FrontDesk.Web.AppStart 7 | { 8 | public class RouteConfig 9 | { 10 | public static void RegisterRoutes(RouteCollection routes) 11 | { 12 | routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); 13 | 14 | routes.MapRoute( 15 | name: "Rooms", 16 | url: "Rooms", 17 | defaults: new { controller = "Home", action = "Rooms" } 18 | ); 19 | routes.MapRoute( 20 | name: "Clients", 21 | url: "Clients", 22 | defaults: new { controller = "Home", action = "Clients" } 23 | ); 24 | routes.MapRoute( 25 | name: "Doctors", 26 | url: "Doctors", 27 | defaults: new { controller = "Home", action = "Doctors" } 28 | ); 29 | routes.MapRoute( 30 | name: "Default", 31 | url: "{controller}/{action}/{id}", 32 | defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } 33 | ); 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/App_Start/Startup.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNet.SignalR; 2 | using Microsoft.Owin; 3 | using Owin; 4 | using StructureMap; 5 | using System; 6 | using System.Linq; 7 | 8 | [assembly: OwinStartup(typeof(FrontDesk.Web.AppStart.Startup))] 9 | namespace FrontDesk.Web.AppStart 10 | { 11 | public class Startup 12 | { 13 | public void Configuration(IAppBuilder app) 14 | { 15 | //var resolver = ObjectFactory.GetInstance(); 16 | //var config = new HubConfiguration { Resolver = resolver }; 17 | app.MapSignalR(); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/App_Start/WebApiConfig.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web.Http; 5 | 6 | namespace FrontDesk.Web 7 | { 8 | public static class WebApiConfig 9 | { 10 | public static void Register(HttpConfiguration config) 11 | { 12 | config.Routes.MapHttpRoute( 13 | name: "DefaultApi", 14 | routeTemplate: "api/{controller}/{id}", 15 | defaults: new { id = RouteParameter.Optional } 16 | ); 17 | config.Routes.MapHttpRoute( 18 | name: "CrudApi", 19 | routeTemplate: "api/crud/{controller}/{id}", 20 | defaults: new { id = RouteParameter.Optional } 21 | ); 22 | 23 | // Uncomment the following line of code to enable query support for actions with an IQueryable or IQueryable return type. 24 | // To avoid processing unexpected or malicious queries, use the validation settings on QueryableAttribute to validate incoming queries. 25 | // For more information, visit http://go.microsoft.com/fwlink/?LinkId=279712. 26 | //config.EnableQuerySupport(); 27 | 28 | // To disable tracing in your application, please comment out or remove the following line of code 29 | // For more information, refer to: http://www.asp.net/web-api 30 | config.EnableSystemDiagnosticsTracing(); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Areas/HelpPage/Controllers/HelpController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Web.Http; 3 | using System.Web.Mvc; 4 | using FrontDesk.Web.Areas.HelpPage.Models; 5 | 6 | namespace FrontDesk.Web.Areas.HelpPage.Controllers 7 | { 8 | /// 9 | /// The controller that will handle requests for the help page. 10 | /// 11 | public class HelpController : Controller 12 | { 13 | public HelpController() 14 | : this(GlobalConfiguration.Configuration) 15 | { 16 | } 17 | 18 | public HelpController(HttpConfiguration config) 19 | { 20 | Configuration = config; 21 | } 22 | 23 | public HttpConfiguration Configuration { get; private set; } 24 | 25 | public ActionResult Index() 26 | { 27 | return View(Configuration.Services.GetApiExplorer().ApiDescriptions); 28 | } 29 | 30 | public ActionResult Api(string apiId) 31 | { 32 | if (!String.IsNullOrEmpty(apiId)) 33 | { 34 | HelpPageApiModel apiModel = Configuration.GetHelpPageApiModel(apiId); 35 | if (apiModel != null) 36 | { 37 | return View(apiModel); 38 | } 39 | } 40 | 41 | return View("Error"); 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Areas/HelpPage/HelpPageAreaRegistration.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Http; 2 | using System.Web.Mvc; 3 | 4 | namespace FrontDesk.Web.Areas.HelpPage 5 | { 6 | public class HelpPageAreaRegistration : AreaRegistration 7 | { 8 | public override string AreaName 9 | { 10 | get 11 | { 12 | return "HelpPage"; 13 | } 14 | } 15 | 16 | public override void RegisterArea(AreaRegistrationContext context) 17 | { 18 | context.MapRoute( 19 | "HelpPage_Default", 20 | "Help/{action}/{apiId}", 21 | new { controller = "Help", action = "Index", apiId = UrlParameter.Optional }); 22 | 23 | HelpPageConfig.Register(GlobalConfiguration.Configuration); 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Areas/HelpPage/SampleGeneration/ImageSample.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace FrontDesk.Web.Areas.HelpPage 4 | { 5 | /// 6 | /// This represents an image sample on the help page. There's a display template named ImageSample associated with this class. 7 | /// 8 | public class ImageSample 9 | { 10 | /// 11 | /// Initializes a new instance of the class. 12 | /// 13 | /// The URL of an image. 14 | public ImageSample(string src) 15 | { 16 | if (src == null) 17 | { 18 | throw new ArgumentNullException("src"); 19 | } 20 | Src = src; 21 | } 22 | 23 | public string Src { get; private set; } 24 | 25 | public override bool Equals(object obj) 26 | { 27 | ImageSample other = obj as ImageSample; 28 | return other != null && Src == other.Src; 29 | } 30 | 31 | public override int GetHashCode() 32 | { 33 | return Src.GetHashCode(); 34 | } 35 | 36 | public override string ToString() 37 | { 38 | return Src; 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Areas/HelpPage/SampleGeneration/InvalidSample.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace FrontDesk.Web.Areas.HelpPage 4 | { 5 | /// 6 | /// This represents an invalid sample on the help page. There's a display template named InvalidSample associated with this class. 7 | /// 8 | public class InvalidSample 9 | { 10 | public InvalidSample(string errorMessage) 11 | { 12 | if (errorMessage == null) 13 | { 14 | throw new ArgumentNullException("errorMessage"); 15 | } 16 | ErrorMessage = errorMessage; 17 | } 18 | 19 | public string ErrorMessage { get; private set; } 20 | 21 | public override bool Equals(object obj) 22 | { 23 | InvalidSample other = obj as InvalidSample; 24 | return other != null && ErrorMessage == other.ErrorMessage; 25 | } 26 | 27 | public override int GetHashCode() 28 | { 29 | return ErrorMessage.GetHashCode(); 30 | } 31 | 32 | public override string ToString() 33 | { 34 | return ErrorMessage; 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Areas/HelpPage/SampleGeneration/SampleDirection.cs: -------------------------------------------------------------------------------- 1 | namespace FrontDesk.Web.Areas.HelpPage 2 | { 3 | /// 4 | /// Indicates whether the sample is used for request or response 5 | /// 6 | public enum SampleDirection 7 | { 8 | Request = 0, 9 | Response 10 | } 11 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Areas/HelpPage/SampleGeneration/TextSample.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace FrontDesk.Web.Areas.HelpPage 4 | { 5 | /// 6 | /// This represents a preformatted text sample on the help page. There's a display template named TextSample associated with this class. 7 | /// 8 | public class TextSample 9 | { 10 | public TextSample(string text) 11 | { 12 | if (text == null) 13 | { 14 | throw new ArgumentNullException("text"); 15 | } 16 | Text = text; 17 | } 18 | 19 | public string Text { get; private set; } 20 | 21 | public override bool Equals(object obj) 22 | { 23 | TextSample other = obj as TextSample; 24 | return other != null && Text == other.Text; 25 | } 26 | 27 | public override int GetHashCode() 28 | { 29 | return Text.GetHashCode(); 30 | } 31 | 32 | public override string ToString() 33 | { 34 | return Text; 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Areas/HelpPage/Views/Help/Api.cshtml: -------------------------------------------------------------------------------- 1 | @using System.Web.Http 2 | @using FrontDesk.Web.Areas.HelpPage.Models 3 | @model HelpPageApiModel 4 | 5 | @{ 6 | var description = Model.ApiDescription; 7 | ViewBag.Title = description.HttpMethod.Method + " " + description.RelativePath; 8 | } 9 | 10 |
11 | 18 |
19 | @Html.DisplayFor(m => Model) 20 |
21 |
22 | 23 | @section Scripts { 24 | 25 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Areas/HelpPage/Views/Help/DisplayTemplates/ApiGroup.cshtml: -------------------------------------------------------------------------------- 1 | @using System.Web.Http 2 | @using System.Web.Http.Description 3 | @using FrontDesk.Web.Areas.HelpPage 4 | @using FrontDesk.Web.Areas.HelpPage.Models 5 | @model IGrouping 6 | 7 |

@Model.Key

8 | 9 | 10 | 11 | 12 | 13 | @foreach (var api in Model) 14 | { 15 | 16 | 17 | 27 | 28 | } 29 | 30 |
APIDescription
@api.HttpMethod.Method @api.RelativePath 18 | @if (api.Documentation != null) 19 | { 20 |

@api.Documentation

21 | } 22 | else 23 | { 24 |

No documentation available.

25 | } 26 |
-------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Areas/HelpPage/Views/Help/DisplayTemplates/HelpPageApiModel.cshtml: -------------------------------------------------------------------------------- 1 | @using System.Web.Http 2 | @using FrontDesk.Web.Areas.HelpPage.Models 3 | @model HelpPageApiModel 4 | 5 | @{ 6 | var description = Model.ApiDescription; 7 | bool hasParameters = description.ParameterDescriptions.Count > 0; 8 | bool hasRequestSamples = Model.SampleRequests.Count > 0; 9 | bool hasResponseSamples = Model.SampleResponses.Count > 0; 10 | } 11 |

@description.HttpMethod.Method @description.RelativePath

12 |
13 | @if (description.Documentation != null) 14 | { 15 |

@description.Documentation

16 | } 17 | else 18 | { 19 |

No documentation available.

20 | } 21 | 22 | @if (hasParameters || hasRequestSamples) 23 | { 24 |

Request Information

25 | if (hasParameters) 26 | { 27 |

Parameters

28 | @Html.DisplayFor(apiModel => apiModel.ApiDescription.ParameterDescriptions, "Parameters") 29 | } 30 | if (hasRequestSamples) 31 | { 32 |

Request body formats

33 | @Html.DisplayFor(apiModel => apiModel.SampleRequests, "Samples") 34 | } 35 | } 36 | 37 | @if (hasResponseSamples) 38 | { 39 |

Response Information

40 |

Response body formats

41 | @Html.DisplayFor(apiModel => apiModel.SampleResponses, "Samples") 42 | } 43 |
-------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Areas/HelpPage/Views/Help/DisplayTemplates/ImageSample.cshtml: -------------------------------------------------------------------------------- 1 | @using FrontDesk.Web.Areas.HelpPage 2 | @model ImageSample 3 | 4 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Areas/HelpPage/Views/Help/DisplayTemplates/InvalidSample.cshtml: -------------------------------------------------------------------------------- 1 | @using FrontDesk.Web.Areas.HelpPage 2 | @model InvalidSample 3 | 4 | @if (HttpContext.Current.IsDebuggingEnabled) 5 | { 6 |
7 |

@Model.ErrorMessage

8 |
9 | } 10 | else 11 | { 12 |

Sample not available.

13 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Areas/HelpPage/Views/Help/DisplayTemplates/Samples.cshtml: -------------------------------------------------------------------------------- 1 | @using System.Net.Http.Headers 2 | @model Dictionary 3 | 4 | @{ 5 | // Group the samples into a single tab if they are the same. 6 | Dictionary samples = Model.GroupBy(pair => pair.Value).ToDictionary( 7 | pair => String.Join(", ", pair.Select(m => m.Key.ToString()).ToArray()), 8 | pair => pair.Key); 9 | var mediaTypes = samples.Keys; 10 | } 11 |
12 | @foreach (var mediaType in mediaTypes) 13 | { 14 |

@mediaType

15 |
16 | Sample: 17 | @{ 18 | var sample = samples[mediaType]; 19 | if (sample == null) 20 | { 21 |

Sample not available.

22 | } 23 | else 24 | { 25 | @Html.DisplayFor(s => sample); 26 | } 27 | } 28 |
29 | } 30 |
-------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Areas/HelpPage/Views/Help/DisplayTemplates/TextSample.cshtml: -------------------------------------------------------------------------------- 1 | @using FrontDesk.Web.Areas.HelpPage 2 | @model TextSample 3 | 4 |
5 | @Model.Text
6 | 
-------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Areas/HelpPage/Views/Help/Index.cshtml: -------------------------------------------------------------------------------- 1 | @using System.Web.Http 2 | @using System.Web.Http.Description 3 | @using System.Collections.ObjectModel 4 | @using FrontDesk.Web.Areas.HelpPage.Models 5 | @model Collection 6 | 7 | @{ 8 | ViewBag.Title = "ASP.NET Web API Help Page"; 9 | 10 | // Group APIs by controller 11 | ILookup apiGroups = Model.ToLookup(api => api.ActionDescriptor.ControllerDescriptor.ControllerName); 12 | } 13 | 14 |
15 |
16 |
17 |

@ViewBag.Title

18 |
19 |
20 |
21 |
22 | 30 |
31 | @foreach (var group in apiGroups) 32 | { 33 | @Html.DisplayFor(m => group, "ApiGroup") 34 | } 35 |
36 |
37 | 38 | @section Scripts { 39 | 40 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Areas/HelpPage/Views/Shared/_Layout.cshtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | @ViewBag.Title 7 | @RenderSection("scripts", required: false) 8 | 9 | 10 | @RenderBody() 11 | 12 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Areas/HelpPage/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | // Change the Layout path below to blend the look and feel of the help page with your existing web pages. 3 | Layout = "~/Areas/HelpPage/Views/Shared/_Layout.cshtml"; 4 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/console.css: -------------------------------------------------------------------------------- 1 | .console div 2 | { 3 | background-image: url("sprite.png"); 4 | background-repeat: no-repeat; 5 | background-color: transparent; 6 | } 7 | * html .console div 8 | { 9 | background-image: url("sprite_ie6.png"); 10 | } 11 | .console 12 | { 13 | background-color: #FFF; 14 | border: 1px solid #CCC; 15 | color: #333; 16 | font: 11px Consolas, Monaco, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace; 17 | height: 200px; 18 | margin: 1.4em 0 0; 19 | overflow-x: hidden; 20 | overflow-y: scroll; 21 | text-align: left; 22 | } 23 | .console .count 24 | { 25 | background-color: #91AFEF; 26 | -moz-border-radius: 15px; 27 | -webkit-border-radius: 15px; 28 | border-radius: 15px; 29 | color: #FFFFFF; 30 | font-size: 10px; 31 | margin-left: 5px; 32 | padding: 2px 6px 2px 5px; 33 | } 34 | .console div 35 | { 36 | background-position: 6px -95px; 37 | border-bottom: 1px solid #DDD; 38 | padding: 5px 5px 4px 24px; 39 | } 40 | .console .error 41 | { 42 | background-position: 6px -135px; 43 | } 44 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/images/ui-bg_flat_75_ffffff_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/images/ui-bg_flat_75_ffffff_40x100.png -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/images/ui-bg_glass_65_ffffff_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/images/ui-bg_glass_65_ffffff_1x400.png -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/images/ui-bg_glass_75_dadada_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/images/ui-bg_glass_75_dadada_1x400.png -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/images/ui-icons_2e83ff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/images/ui-icons_2e83ff_256x240.png -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/images/ui-icons_454545_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/images/ui-icons_454545_256x240.png -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/images/ui-icons_888888_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/images/ui-icons_888888_256x240.png -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/images/ui-icons_cd0a0a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/images/ui-icons_cd0a0a_256x240.png -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/jquery.ui.accordion.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Accordion 1.8.24 3 | * 4 | * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) 5 | * Licensed under the MIT license. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Accordion#theming 9 | */ 10 | /* IE/Win - Fix animation bug - #4615 */ 11 | .ui-accordion { width: 100%; } 12 | .ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } 13 | .ui-accordion .ui-accordion-li-fix { display: inline; } 14 | .ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } 15 | .ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; } 16 | .ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; } 17 | .ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } 18 | .ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; } 19 | .ui-accordion .ui-accordion-content-active { display: block; } 20 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/jquery.ui.all.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI CSS Framework 1.8.24 3 | * 4 | * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) 5 | * Licensed under the MIT license. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Theming 9 | */ 10 | @import "jquery.ui.base.css"; 11 | @import "jquery.ui.theme.css"; 12 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/jquery.ui.autocomplete.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Autocomplete 1.8.24 3 | * 4 | * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) 5 | * Licensed under the MIT license. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Autocomplete#theming 9 | */ 10 | .ui-autocomplete { position: absolute; cursor: default; } 11 | 12 | /* workarounds */ 13 | * html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ 14 | 15 | /* 16 | * jQuery UI Menu 1.8.24 17 | * 18 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) 19 | * Licensed under the MIT license. 20 | * http://jquery.org/license 21 | * 22 | * http://docs.jquery.com/UI/Menu#theming 23 | */ 24 | .ui-menu { 25 | list-style:none; 26 | padding: 2px; 27 | margin: 0; 28 | display:block; 29 | float: left; 30 | } 31 | .ui-menu .ui-menu { 32 | margin-top: -3px; 33 | } 34 | .ui-menu .ui-menu-item { 35 | margin:0; 36 | padding: 0; 37 | zoom: 1; 38 | float: left; 39 | clear: left; 40 | width: 100%; 41 | } 42 | .ui-menu .ui-menu-item a { 43 | text-decoration:none; 44 | display:block; 45 | padding:.2em .4em; 46 | line-height:1.5; 47 | zoom:1; 48 | } 49 | .ui-menu .ui-menu-item a.ui-state-hover, 50 | .ui-menu .ui-menu-item a.ui-state-active { 51 | font-weight: normal; 52 | margin: -1px; 53 | } 54 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/jquery.ui.base.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI CSS Framework 1.8.24 3 | * 4 | * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) 5 | * Licensed under the MIT license. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Theming 9 | */ 10 | @import url("jquery.ui.core.css"); 11 | 12 | @import url("jquery.ui.accordion.css"); 13 | @import url("jquery.ui.autocomplete.css"); 14 | @import url("jquery.ui.button.css"); 15 | @import url("jquery.ui.datepicker.css"); 16 | @import url("jquery.ui.dialog.css"); 17 | @import url("jquery.ui.progressbar.css"); 18 | @import url("jquery.ui.resizable.css"); 19 | @import url("jquery.ui.selectable.css"); 20 | @import url("jquery.ui.slider.css"); 21 | @import url("jquery.ui.tabs.css"); 22 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/jquery.ui.core.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI CSS Framework 1.8.24 3 | * 4 | * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) 5 | * Licensed under the MIT license. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Theming/API 9 | */ 10 | 11 | /* Layout helpers 12 | ----------------------------------*/ 13 | .ui-helper-hidden { display: none; } 14 | .ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); } 15 | .ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } 16 | .ui-helper-clearfix:before, .ui-helper-clearfix:after { content: ""; display: table; } 17 | .ui-helper-clearfix:after { clear: both; } 18 | .ui-helper-clearfix { zoom: 1; } 19 | .ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } 20 | 21 | 22 | /* Interaction Cues 23 | ----------------------------------*/ 24 | .ui-state-disabled { cursor: default !important; } 25 | 26 | 27 | /* Icons 28 | ----------------------------------*/ 29 | 30 | /* states and images */ 31 | .ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } 32 | 33 | 34 | /* Misc visuals 35 | ----------------------------------*/ 36 | 37 | /* Overlays */ 38 | .ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } 39 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/jquery.ui.dialog.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Dialog 1.8.24 3 | * 4 | * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) 5 | * Licensed under the MIT license. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Dialog#theming 9 | */ 10 | .ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; } 11 | .ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; } 12 | .ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; } 13 | .ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } 14 | .ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } 15 | .ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } 16 | .ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } 17 | .ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } 18 | .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; } 19 | .ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; } 20 | .ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } 21 | .ui-draggable .ui-dialog-titlebar { cursor: move; } 22 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/jquery.ui.progressbar.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Progressbar 1.8.24 3 | * 4 | * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) 5 | * Licensed under the MIT license. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Progressbar#theming 9 | */ 10 | .ui-progressbar { height:2em; text-align: left; overflow: hidden; } 11 | .ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/jquery.ui.resizable.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Resizable 1.8.24 3 | * 4 | * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) 5 | * Licensed under the MIT license. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Resizable#theming 9 | */ 10 | .ui-resizable { position: relative;} 11 | .ui-resizable-handle { position: absolute;font-size: 0.1px; display: block; } 12 | .ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } 13 | .ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } 14 | .ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } 15 | .ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; } 16 | .ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; } 17 | .ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } 18 | .ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } 19 | .ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } 20 | .ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;} -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/jquery.ui.selectable.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Selectable 1.8.24 3 | * 4 | * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) 5 | * Licensed under the MIT license. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Selectable#theming 9 | */ 10 | .ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; } 11 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/jquery.ui.slider.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Slider 1.8.24 3 | * 4 | * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) 5 | * Licensed under the MIT license. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Slider#theming 9 | */ 10 | .ui-slider { position: relative; text-align: left; } 11 | .ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } 12 | .ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; } 13 | 14 | .ui-slider-horizontal { height: .8em; } 15 | .ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } 16 | .ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } 17 | .ui-slider-horizontal .ui-slider-range-min { left: 0; } 18 | .ui-slider-horizontal .ui-slider-range-max { right: 0; } 19 | 20 | .ui-slider-vertical { width: .8em; height: 100px; } 21 | .ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } 22 | .ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } 23 | .ui-slider-vertical .ui-slider-range-min { bottom: 0; } 24 | .ui-slider-vertical .ui-slider-range-max { top: 0; } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/jquery.ui.tabs.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Tabs 1.8.24 3 | * 4 | * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) 5 | * Licensed under the MIT license. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Tabs#theming 9 | */ 10 | .ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ 11 | .ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; } 12 | .ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; } 13 | .ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; } 14 | .ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; } 15 | .ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } 16 | .ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ 17 | .ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; } 18 | .ui-tabs .ui-tabs-hide { display: none !important; } 19 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/minified/images/ui-bg_flat_0_aaaaaa_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/minified/images/ui-bg_flat_0_aaaaaa_40x100.png -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/minified/images/ui-bg_flat_75_ffffff_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/minified/images/ui-bg_flat_75_ffffff_40x100.png -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/minified/images/ui-bg_glass_55_fbf9ee_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/minified/images/ui-bg_glass_55_fbf9ee_1x400.png -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/minified/images/ui-bg_glass_65_ffffff_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/minified/images/ui-bg_glass_65_ffffff_1x400.png -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/minified/images/ui-bg_glass_75_dadada_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/minified/images/ui-bg_glass_75_dadada_1x400.png -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/minified/images/ui-bg_glass_75_e6e6e6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/minified/images/ui-bg_glass_75_e6e6e6_1x400.png -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/minified/images/ui-bg_glass_95_fef1ec_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/minified/images/ui-bg_glass_95_fef1ec_1x400.png -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/minified/images/ui-bg_highlight-soft_75_cccccc_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/minified/images/ui-bg_highlight-soft_75_cccccc_1x100.png -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/minified/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/minified/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/minified/images/ui-icons_2e83ff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/minified/images/ui-icons_2e83ff_256x240.png -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/minified/images/ui-icons_454545_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/minified/images/ui-icons_454545_256x240.png -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/minified/images/ui-icons_888888_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/minified/images/ui-icons_888888_256x240.png -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/minified/images/ui-icons_cd0a0a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/minified/images/ui-icons_cd0a0a_256x240.png -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/minified/jquery.ui.accordion.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.8.24 - 2012-09-28 2 | * https://github.com/jquery/jquery-ui 3 | * Includes: jquery.ui.accordion.css 4 | * Copyright (c) 2012 AUTHORS.txt; Licensed MIT */ 5 | .ui-accordion{width:100%}.ui-accordion .ui-accordion-header{cursor:pointer;position:relative;margin-top:1px;zoom:1}.ui-accordion .ui-accordion-li-fix{display:inline}.ui-accordion .ui-accordion-header-active{border-bottom:0!important}.ui-accordion .ui-accordion-header a{display:block;font-size:1em;padding:.5em .5em .5em .7em}.ui-accordion-icons .ui-accordion-header a{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;margin-top:-2px;position:relative;top:1px;margin-bottom:2px;overflow:auto;display:none;zoom:1}.ui-accordion .ui-accordion-content-active{display:block} -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/minified/jquery.ui.autocomplete.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.8.24 - 2012-09-28 2 | * https://github.com/jquery/jquery-ui 3 | * Includes: jquery.ui.autocomplete.css 4 | * Copyright (c) 2012 AUTHORS.txt; Licensed MIT */ 5 | .ui-autocomplete{position:absolute;cursor:default}* html .ui-autocomplete{width:1px}.ui-menu{list-style:none;padding:2px;margin:0;display:block;float:left}.ui-menu .ui-menu{margin-top:-3px}.ui-menu .ui-menu-item{margin:0;padding:0;zoom:1;float:left;clear:left;width:100%}.ui-menu .ui-menu-item a{text-decoration:none;display:block;padding:.2em .4em;line-height:1.5;zoom:1}.ui-menu .ui-menu-item a.ui-state-hover,.ui-menu .ui-menu-item a.ui-state-active{font-weight:normal;margin:-1px} -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/minified/jquery.ui.core.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.8.24 - 2012-09-28 2 | * https://github.com/jquery/jquery-ui 3 | * Includes: jquery.ui.core.css 4 | * Copyright (c) 2012 AUTHORS.txt; Licensed MIT */ 5 | .ui-helper-hidden{display:none}.ui-helper-hidden-accessible{position:absolute!important;clip:rect(1px);clip:rect(1px,1px,1px,1px)}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{zoom:1}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:absolute;top:0;left:0;width:100%;height:100%} -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/minified/jquery.ui.dialog.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.8.24 - 2012-09-28 2 | * https://github.com/jquery/jquery-ui 3 | * Includes: jquery.ui.dialog.css 4 | * Copyright (c) 2012 AUTHORS.txt; Licensed MIT */ 5 | .ui-dialog{position:absolute;padding:.2em;width:300px;overflow:hidden}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 16px .1em 0}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:19px;margin:-10px 0 0 0;padding:1px;height:18px}.ui-dialog .ui-dialog-titlebar-close span{display:block;margin:1px}.ui-dialog .ui-dialog-titlebar-close:hover,.ui-dialog .ui-dialog-titlebar-close:focus{padding:0}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:none;overflow:auto;zoom:1}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin:.5em 0 0 0;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:14px;height:14px;right:3px;bottom:3px}.ui-draggable .ui-dialog-titlebar{cursor:move} -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/minified/jquery.ui.progressbar.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.8.24 - 2012-09-28 2 | * https://github.com/jquery/jquery-ui 3 | * Includes: jquery.ui.progressbar.css 4 | * Copyright (c) 2012 AUTHORS.txt; Licensed MIT */ 5 | .ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%} -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/minified/jquery.ui.resizable.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.8.24 - 2012-09-28 2 | * https://github.com/jquery/jquery-ui 3 | * Includes: jquery.ui.resizable.css 4 | * Copyright (c) 2012 AUTHORS.txt; Licensed MIT */ 5 | .ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:0.1px;display:block}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px} -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/minified/jquery.ui.selectable.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.8.24 - 2012-09-28 2 | * https://github.com/jquery/jquery-ui 3 | * Includes: jquery.ui.selectable.css 4 | * Copyright (c) 2012 AUTHORS.txt; Licensed MIT */ 5 | .ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black} -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/minified/jquery.ui.slider.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.8.24 - 2012-09-28 2 | * https://github.com/jquery/jquery-ui 3 | * Includes: jquery.ui.slider.css 4 | * Copyright (c) 2012 AUTHORS.txt; Licensed MIT */ 5 | .ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0} -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Content/themes/base/minified/jquery.ui.tabs.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.8.24 - 2012-09-28 2 | * https://github.com/jquery/jquery-ui 3 | * Includes: jquery.ui.tabs.css 4 | * Copyright (c) 2012 AUTHORS.txt; Licensed MIT */ 5 | .ui-tabs{position:relative;padding:.2em;zoom:1}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:1px;margin:0 .2em 1px 0;border-bottom:0!important;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav li a{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-selected{margin-bottom:0;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-selected a,.ui-tabs .ui-tabs-nav li.ui-state-disabled a,.ui-tabs .ui-tabs-nav li.ui-state-processing a{cursor:text}.ui-tabs .ui-tabs-nav li a,.ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:none}.ui-tabs .ui-tabs-hide{display:none!important} -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Controllers/Api/AppointmentTypesController.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Web.Http; 3 | using AppointmentScheduling.Data; 4 | using FrontDesk.Web.Models; 5 | using System.Linq; 6 | 7 | namespace FrontDesk.Web.Controllers.Api 8 | { 9 | public class AppointmentTypesController : ApiController 10 | { 11 | private SchedulingContext db = new SchedulingContext(); 12 | 13 | // GET api/values 14 | public IEnumerable Get() 15 | { 16 | return db.AppointmentTypes.Select(a => new AppointmentTypeViewModel() 17 | { 18 | AppointmentTypeId = a.Id, 19 | Name=a.Name, 20 | Code=a.Code, 21 | Duration=a.Duration 22 | }) 23 | .OrderBy(a => a.Name); 24 | } 25 | 26 | // GET api/values/5 27 | public string Get(int id) 28 | { 29 | return "value"; 30 | } 31 | 32 | // POST api/values 33 | public void Post([FromBody] 34 | string value) 35 | { 36 | } 37 | 38 | // PUT api/values/5 39 | public void Put(int id, [FromBody] 40 | string value) 41 | { 42 | } 43 | 44 | // DELETE api/values/5 45 | public void Delete(int id) 46 | { 47 | } 48 | } 49 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Web.Mvc; 4 | 5 | namespace FrontDesk.Web.Controllers 6 | { 7 | public class HomeController : Controller 8 | { 9 | public ActionResult Index() 10 | { 11 | return View(); 12 | } 13 | 14 | public ActionResult Doctors() 15 | { 16 | return View(); 17 | } 18 | 19 | public ActionResult Rooms() 20 | { 21 | return View(); 22 | } 23 | 24 | public ActionResult Clients() 25 | { 26 | return View(); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/DependencyResolution/SignalRSmDependencyResolver.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using Microsoft.AspNet.SignalR; 5 | using StructureMap; 6 | 7 | namespace FrontDesk.Web.DependencyResolution 8 | { 9 | //public class SignalRSmDependencyResolver : DefaultDependencyResolver 10 | //{ 11 | // private IContainer _container; 12 | 13 | // public SignalRSmDependencyResolver(IContainer container) 14 | // { 15 | // _container = container; 16 | // } 17 | 18 | // public override object GetService(Type serviceType) 19 | // { 20 | // object service = null; 21 | // if (!serviceType.IsAbstract && !serviceType.IsInterface && serviceType.IsClass) 22 | // { 23 | // // Concrete type resolution 24 | // service = _container.GetInstance(serviceType); 25 | // } 26 | // else 27 | // { 28 | // // Other type resolution with base fallback 29 | // service = _container.TryGetInstance(serviceType) ?? base.GetService(serviceType); 30 | // } 31 | // return service; 32 | // } 33 | 34 | // public override IEnumerable GetServices(Type serviceType) 35 | // { 36 | // var objects = _container.GetAllInstances(serviceType).Cast(); 37 | // return objects.Concat(base.GetServices(serviceType)); 38 | // } 39 | //} 40 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="FrontDesk.Web.WebApiApplication" Language="C#" %> 2 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Hubs/AppointmentConfirmedHandler.cs: -------------------------------------------------------------------------------- 1 | using AppointmentScheduling.Core.Model.Events; 2 | using FrontDesk.SharedKernel.Interfaces; 3 | using Microsoft.AspNet.SignalR; 4 | 5 | namespace FrontDesk.Web.Hubs 6 | { 7 | public class AppointmentConfirmedHandler : IHandle 8 | { 9 | public void Handle(AppointmentConfirmedEvent args) 10 | { 11 | var hubContext = GlobalHost.ConnectionManager.GetHubContext(); 12 | hubContext.Clients.All.showAlert(args.AppointmentUpdated.Title + " was confirmed"); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Hubs/AppointmentUpdateHandler.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using AppointmentScheduling.Core.Model.Events; 3 | using FrontDesk.SharedKernel.Interfaces; 4 | using Microsoft.AspNet.SignalR; 5 | 6 | namespace FrontDesk.Web.Hubs 7 | { 8 | public class AppointmentUpdateHandler : IHandle 9 | { 10 | public void Handle(AppointmentUpdatedEvent args) 11 | { 12 | var hubContext = GlobalHost.ConnectionManager.GetHubContext(); 13 | hubContext.Clients.All.showAlert(args.AppointmentUpdated.Title + " was updated"); 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Hubs/HubActivator.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNet.SignalR.Hubs; 2 | using StructureMap; 3 | 4 | namespace FrontDesk.Web.Hubs 5 | { 6 | public class HubActivator : IHubActivator 7 | { 8 | private readonly IContainer container; 9 | 10 | public HubActivator(IContainer container) 11 | { 12 | this.container = container; 13 | } 14 | 15 | public IHub Create(HubDescriptor descriptor) 16 | { 17 | return (IHub)container.GetInstance(descriptor.HubType); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Hubs/ScheduleHub.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNet.SignalR; 2 | using Microsoft.AspNet.SignalR.Hubs; 3 | using StructureMap; 4 | using System; 5 | using System.Linq; 6 | 7 | namespace FrontDesk.Web.Hubs 8 | { 9 | public class ScheduleHub : Hub 10 | { 11 | public void UpdateSchedule(string s) 12 | { 13 | Clients.All.showAlert(s); 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Clients/Steve_Smith.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Clients/Steve_Smith.jpg -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Doctors/Dr_McDreamy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Doctors/Dr_McDreamy.jpg -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Doctors/Dr_Smith.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Doctors/Dr_Smith.jpg -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Doctors/Dr_Who.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Doctors/Dr_Who.jpg -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Doctors/No_Doctor_Selected.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Doctors/No_Doctor_Selected.jpg -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/Allegra.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/Allegra.jpg -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/Anubis.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/Anubis.jpg -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/Bella.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/Bella.jpg -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/Boots.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/Boots.jpg -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/Butterfinger.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/Butterfinger.jpg -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/Callie.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/Callie.jpg -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/Corde.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/Corde.jpg -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/Finley.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/Finley.jpg -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/Ginger.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/Ginger.jpg -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/Indiana Jones.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/Indiana Jones.jpg -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/Lizzie.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/Lizzie.jpg -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/Luabelle.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/Luabelle.jpg -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/Lulu.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/Lulu.jpg -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/Pax.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/Pax.jpg -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/Piper.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/Piper.jpg -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/Rocky.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/Rocky.jpg -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/Rufus.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/Rufus.JPG -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/Ruske.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/Ruske.jpg -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/Tinkerbell.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/Tinkerbell.jpg -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/Zak.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/Zak.jpg -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/charlie.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/charlie.jpg -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/darwin.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/darwin.jpg -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/radar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/radar.jpg -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/rumor.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/rumor.jpg -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/sampson.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/sampson.jpg -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/zoe.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/Patients/zoe.jpg -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/accent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/accent.png -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/bullet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/bullet.png -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/heroAccent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/heroAccent.png -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/orderedList0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/orderedList0.png -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/orderedList1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/orderedList1.png -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/orderedList2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/orderedList2.png -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/orderedList3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/orderedList3.png -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/orderedList4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/orderedList4.png -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/orderedList5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/orderedList5.png -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/orderedList6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/orderedList6.png -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/orderedList7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/orderedList7.png -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/orderedList8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/orderedList8.png -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/orderedList9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/Images/orderedList9.png -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Models/DoctorViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace FrontDesk.Web.Models 4 | { 5 | public class DoctorViewModel 6 | { 7 | public int DoctorId { get; set; } 8 | public string Name { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Models/OfficeSettings.cs: -------------------------------------------------------------------------------- 1 | using AppointmentScheduling.Core.Interfaces; 2 | using System; 3 | using System.Linq; 4 | 5 | namespace FrontDesk.Web.Models 6 | { 7 | public class OfficeSettings : IApplicationSettings 8 | { 9 | public int ClinicId { get { return 1; } } 10 | 11 | public DateTime TestDate { get { return new DateTime(2014, 6, 9); } } 12 | } 13 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Scripts/_references.js: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | /// 4 | /// 5 | /// 6 | /// 7 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Views/Shared/Error.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = null; 3 | } 4 | 5 | 6 | 7 | 8 | 9 | Error 10 | 11 | 12 |
13 |

Error.

14 |

An error occurred while processing your request.

15 |
16 | 17 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "~/Views/Shared/_Layout.cshtml"; 3 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Web.Debug.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 17 | 18 | 29 | 30 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/Web.Release.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 30 | 31 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.Web/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/FrontDeskSolution/FrontDesk.Web/favicon.ico -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/FrontDesk.jmconfig: -------------------------------------------------------------------------------- 1 | false -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/README.txt: -------------------------------------------------------------------------------- 1 | This would take care of non-appointment related scheduling of staff, rooms, and other clinic resources. -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/Requirements.md: -------------------------------------------------------------------------------- 1 | # Vet Management Application # 2 | ## Front Desk Requirements ## 3 | 4 | **UI Concern** 5 | 6 | As a user 7 | I want to log in 8 | so I can access the system 9 | 10 | **Domain Services** 11 | 12 | As a user 13 | I want to view a list of current clients 14 | Including name, dates of last/next appointments, phone # 15 | 16 | As a user 17 | I want to view the details of a single client 18 | Including their patients, billing information, and email 19 | 20 | As a user 21 | I want to add a new patient to a client 22 | Including its name, species, photo, gender, and initial history 23 | 24 | As a user 25 | I want to update the details of a patient 26 | Including name, photo, gender, and history 27 | History includes date, weight, temperature, and notes 28 | 29 | As a user 30 | I want to update the details of a client 31 | 32 | As a user 33 | I want to view all appointments 34 | [for the clinic] 35 | [for a given patient] 36 | [for a given client] 37 | [for a given day] 38 | [for a given week] 39 | [for a given month] 40 | 41 | As a user 42 | I want to add an appointment for a given patient 43 | 44 | As a user 45 | I want to modify an appointment for a given patient 46 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/SharedDatabaseManagement/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/SharedDatabaseManagement/Model/Appointment.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using FrontDesk.SharedKernel; 3 | 4 | namespace VetOffice.SharedDatabase.Model 5 | { 6 | public class Appointment 7 | { 8 | public Guid Id { get; set; } 9 | public Guid ScheduleId { get; set; } 10 | public int ClientId { get; set; } 11 | public int PatientId { get; set; } 12 | public int RoomId { get; set; } 13 | public int? DoctorId { get; set; } 14 | public DateTimeRange TimeRange { get; set; } 15 | public int AppointmentTypeId { get; set; } 16 | public string Title { get; set; } 17 | public DateTime? DateTimeConfirmed { get; set; } 18 | } 19 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/SharedDatabaseManagement/Model/AppointmentType.cs: -------------------------------------------------------------------------------- 1 | namespace VetOffice.SharedDatabase.Model 2 | { 3 | public class AppointmentType 4 | { 5 | public int Id { get; set; } 6 | public string Name { get; set; } 7 | public string Code { get; set; } 8 | public int Duration { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/SharedDatabaseManagement/Model/Client.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace VetOffice.SharedDatabase.Model 4 | { 5 | public class Client 6 | { 7 | public Client() 8 | { 9 | Patients = new List(); 10 | } 11 | 12 | public int Id { get; set; } 13 | public string FullName { get; set; } 14 | public string Salutation { get; set; } 15 | public string EmailAddress { get; set; } 16 | public string PreferredName { get; set; } 17 | public int? PreferredDoctorId { get; set; } 18 | 19 | public IList Patients { get; private set; } 20 | } 21 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/SharedDatabaseManagement/Model/Doctor.cs: -------------------------------------------------------------------------------- 1 | namespace VetOffice.SharedDatabase.Model 2 | { 3 | public class Doctor 4 | { 5 | public int Id { get; set; } 6 | public string Name { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/SharedDatabaseManagement/Model/Patient.cs: -------------------------------------------------------------------------------- 1 | using FrontDesk.SharedKernel.Enums; 2 | using VetOffice.SharedDatabase.Model.ValueObjects; 3 | 4 | namespace VetOffice.SharedDatabase.Model 5 | { 6 | public class Patient 7 | { 8 | public int Id { get; set; } 9 | public Client Owner { get; private set; } 10 | public int ClientId { get; set; } 11 | public string Name { get; set; } 12 | public Gender Gender { get; set; } 13 | public AnimalType AnimalType { get; set; } 14 | public int? PreferredDoctorId { get; set; } 15 | 16 | public Patient(Client owner) 17 | : this() 18 | { 19 | ClientId = owner.Id; 20 | Owner = owner; 21 | PreferredDoctorId = Owner.PreferredDoctorId; 22 | } 23 | 24 | public Patient() 25 | { 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/SharedDatabaseManagement/Model/Room.cs: -------------------------------------------------------------------------------- 1 | namespace VetOffice.SharedDatabase.Model 2 | { 3 | public class Room 4 | { 5 | public int Id { get; set; } 6 | public string Name { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/SharedDatabaseManagement/Model/Schedule.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | namespace VetOffice.SharedDatabase.Model 6 | { 7 | public class Schedule 8 | { 9 | public Guid Id { get; set; } 10 | public int ClinicId { get; set; } 11 | public ICollection Appointments { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/SharedDatabaseManagement/Model/ValueObjects/AnimalType.cs: -------------------------------------------------------------------------------- 1 | namespace VetOffice.SharedDatabase.Model.ValueObjects 2 | { 3 | public class AnimalType 4 | { 5 | 6 | public string Species { get; private set; } 7 | public string Breed { get; private set; } 8 | 9 | public AnimalType(string species, string breed) 10 | { 11 | this.Species = species; 12 | this.Breed = breed; 13 | } 14 | 15 | // needed for EF? 16 | internal AnimalType() { } 17 | 18 | } 19 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/SharedDatabaseManagement/Model/ValueObjects/AppointmentStartEnd.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace VetOffice.SharedDatabase.Model.ValueObjects 4 | { 5 | public class AppointmentStartEnd 6 | { 7 | public DateTime Start { get; set; } 8 | public DateTime End { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/SharedDatabaseManagement/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/SharedDatabaseTests/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 20 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/SharedDatabaseTests/Data/SchedulingContextShould.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Data.Entity; 3 | using System.Linq; 4 | using NUnit.Framework; 5 | using VetOffice.SharedDatabase.DataModel; 6 | 7 | namespace SharedDatabaseTests.Data 8 | { 9 | [TestFixture] 10 | public class SharedDatabaseContextShould 11 | { 12 | public SharedDatabaseContextShould() 13 | { 14 | Database.SetInitializer(new TestInitializerForVetContext()); 15 | // AppDomain.CurrentDomain.SetData("DataDirectory", ""); 16 | } 17 | 18 | [Test] 19 | //[Ignore] 20 | public void BuildModel() 21 | { 22 | var db = new VetOfficeContext(); 23 | db.Database.Initialize(true); 24 | // var clients = db.Clients.ToList(); 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/SharedDatabaseTests/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/SharedKernel.UnitTests/DateTimeRangeShould.cs: -------------------------------------------------------------------------------- 1 | using FrontDesk.SharedKernel; 2 | using NUnit.Framework; 3 | using System; 4 | using System.Linq; 5 | 6 | namespace SharedKernel.UnitTests 7 | { 8 | [TestFixture] 9 | class DateTimeRangeShould 10 | { 11 | private DateTime _testStartDate = new DateTime(1, 1, 2014, 9, 0, 0); 12 | 13 | [Test] 14 | [ExpectedException(typeof(ArgumentException))] 15 | public void ThrowArgumentExceptionIfStartDateEqualsEndDate() 16 | { 17 | var result = new DateTimeRange(_testStartDate, _testStartDate); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /FrontDesk/FrontDeskSolution/SharedKernel.UnitTests/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /FrontDesk/ReportViewerSolution/.nuget/NuGet.Config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /FrontDesk/ReportViewerSolution/.nuget/NuGet.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/ReportViewerSolution/.nuget/NuGet.exe -------------------------------------------------------------------------------- /FrontDesk/ReportViewerSolution/AboutThisSolution.txt: -------------------------------------------------------------------------------- 1 | The PatientHistoryTabletApp is a CRUD solution. It isn't complex and therefore doesn't require DDD. 2 | 3 | Most of the apps functionality will be to retrieve data. 4 | Users can search for pateitns and retrieve info and visit history records for a selected patient. 5 | Users can create a new Visit record for a selected, existing patient. 6 | The only data the user will add is a note, which is a text field. 7 | The app will already know the date and time, the user (based on a login) and the patient (based on selection). 8 | 9 | The solution was developed using BDD. We defined the features, then created 10 | tests from those features and then created the domain types, repository and data access based on the needs defined in the tests. 11 | 12 | Because of its simplicity, many of the tests are integration tests, that leverage Entity Fraemwork and interact with an database. 13 | The database is created (and recreated) on the fly for each given test run. -------------------------------------------------------------------------------- /FrontDesk/ReportViewerSolution/Build.bat: -------------------------------------------------------------------------------- 1 | %systemroot%\Microsoft.Net\Framework\v4.0.30319\MSBuild.exe build.proj /t:%* 2 | -------------------------------------------------------------------------------- /FrontDesk/ReportViewerSolution/Build.proj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | PatientHistory 5 | PatientHistory 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /FrontDesk/ReportViewerSolution/ClickToBuild.bat: -------------------------------------------------------------------------------- 1 | build.bat unittests & pause 2 | -------------------------------------------------------------------------------- /FrontDesk/ReportViewerSolution/PatientHistory.Core/Entities/Visit.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace PatientHistory.Domain.Entities 4 | { 5 | public class Visit 6 | { 7 | //have to remember, this will be read only in this context. So far, 8 | //there is no need for a ctor or factory..dang execpt for integration test :( 9 | public int Id { get; private set; } 10 | public DateTime CheckedIn { get; private set; } 11 | public DateTime? CheckedOut { get; private set; } 12 | public int PatientId { get; private set; } 13 | public decimal WeightAtCheckIn { get; private set; } 14 | public string CheckInNotes { get; private set; } 15 | public bool Cancelled{ get; private set; } 16 | 17 | public bool CurrentlyCheckedIn 18 | { 19 | get { return CheckedOut.HasValue==false && Cancelled == false; } 20 | } 21 | 22 | public Visit(int patientid, decimal weight,string notes,DateTime datetime) 23 | { 24 | PatientId = patientid; 25 | WeightAtCheckIn = weight; 26 | CheckInNotes = notes; 27 | CheckedIn = datetime; 28 | } 29 | public void CheckOut() 30 | { 31 | CheckedOut = DateTime.Now; 32 | } 33 | 34 | //can our sample benefit from knowing who brought the patient? who checked the patient in? 35 | } 36 | } -------------------------------------------------------------------------------- /FrontDesk/ReportViewerSolution/PatientHistory.Core/Entities/VisitNote.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using PatientHistory.Domain.Enums; 3 | 4 | namespace PatientHistory.Domain 5 | { 6 | public class VisitNote 7 | { 8 | public int Id { get; set; } 9 | public int DoctorId { get; private set; } 10 | public DateTime VisitDateTime { get; private set; } 11 | public OverallHealthStatus OverallStatus { get; private set; } 12 | public string Notes { get; private set; } 13 | public int VisitId { get; private set; } 14 | 15 | } 16 | } -------------------------------------------------------------------------------- /FrontDesk/ReportViewerSolution/PatientHistory.Core/Enums/OverallHealthStatus.cs: -------------------------------------------------------------------------------- 1 | namespace PatientHistory.Domain.Enums 2 | { 3 | public enum OverallHealthStatus 4 | { 5 | Great=1, 6 | Good=2, 7 | Poor=3, 8 | Alarming=4 9 | } 10 | } -------------------------------------------------------------------------------- /FrontDesk/ReportViewerSolution/PatientHistory.Core/ValueObjects/CheckedInPatientResultItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace PatientHistory.Domain.ValueObjects 4 | { 5 | public class CheckedInPatientResultItem:PatientResultItem 6 | { 7 | public DateTime CheckedIn { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /FrontDesk/ReportViewerSolution/PatientHistory.Core/ValueObjects/PatientResultItem.cs: -------------------------------------------------------------------------------- 1 | namespace PatientHistory.Domain.ValueObjects 2 | { 3 | public class PatientResultItem 4 | { 5 | public PatientResultItem(string firstName, string lastName, string breed, string species, int age, int id) 6 | { 7 | FirstName = firstName; 8 | LastName = lastName; 9 | Breed = breed; 10 | Species = species; 11 | Age = age; 12 | PatientId = id; 13 | } 14 | 15 | public PatientResultItem() 16 | { 17 | 18 | } 19 | public string FirstName { get; set; } 20 | public string LastName { get; set; } 21 | public string Breed { get; set; } 22 | public string Species { get; set; } 23 | public decimal Age { get; set; } 24 | public int PatientId { get; set; } 25 | } 26 | } -------------------------------------------------------------------------------- /FrontDesk/ReportViewerSolution/PatientHistory.Infrastructure/Helpers/DBSeedingInitializer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Data.Entity; 3 | using PatientHistory.Domain.Entities; 4 | using Repository; 5 | 6 | namespace Repository.Helpers 7 | { 8 | public class PatientHistoryDbSeedingInitializer:CreateDatabaseIfNotExists 9 | { 10 | protected override void Seed(PatientHistoryDataContext context) 11 | { 12 | context.Patients.Add 13 | (PatientInfo.CreatePatientInfoWithHistory(0,"Sampson", "Flynn", "Newfoundland", "Dog", 120,DateTime.Now,5, "watch tremor in rear legs")); 14 | 15 | base.Seed(context); 16 | } 17 | 18 | 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /FrontDesk/ReportViewerSolution/PatientHistory.Infrastructure/PatientHistoryDataContext.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Data.Entity; 3 | using PatientHistory.Domain.Entities; 4 | 5 | namespace Repository 6 | { 7 | public class PatientHistoryDataContext:DbContext 8 | { 9 | public IDbSet Patients { get; set; } 10 | 11 | public IDbSet Visits{ get; set; } 12 | 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /FrontDesk/ReportViewerSolution/PatientHistory.Infrastructure/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /FrontDesk/ReportViewerSolution/PatientHistory.UnitTests/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 |
7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /FrontDesk/ReportViewerSolution/PatientHistory.UnitTests/Features/Checked In Patients/SelectPatientFromCheckedInList.feature: -------------------------------------------------------------------------------- 1 | Feature: SelectPatientFromCheckedInList 2 | In order to avoid silly mistakes 3 | As a math idiot 4 | I want to be told the sum of two numbers 5 | 6 | @mytag 7 | Scenario: Select Patient from List of Checked In Patients 8 | Given There are patients who are currently checked in but not checked out 9 | Then I can view a list of these patients 10 | And Select a patient to be retrieved 11 | -------------------------------------------------------------------------------- /FrontDesk/ReportViewerSolution/PatientHistory.UnitTests/Features/Name Search/Retrieve Patient from User Selection.feature: -------------------------------------------------------------------------------- 1 | Feature: Retrieve Patient from User Selection 2 | User has selected a patient from a list 3 | Patient ID is used to retrieve patient and history from data store 4 | 5 | 6 | 7 | @mytag 8 | Scenario: Retrieve patient history 9 | Given I am viewing a list of patients 10 | When I select an item from the list 11 | Then the patient information for selected patient should be retrieved 12 | And patient info with history should be displayed 13 | And history should be grouped by descending date -------------------------------------------------------------------------------- /FrontDesk/ReportViewerSolution/PatientHistory.UnitTests/Features/Name Search/SearchForPatient.feature: -------------------------------------------------------------------------------- 1 | Feature: SearchForPatient 2 | Search for a patient (pet) by using 3 | patient first name and client last name 4 | Results presented in a list 5 | 6 | 7 | @mytag2 8 | Scenario: Matching Patients Found 9 | Given I have provided an existing patient first name into the form 10 | And I have provided the same patient's client last name into the form 11 | When I execute a patient search 12 | Then the result should be a list of one or more matching patients 13 | 14 | Scenario: No Matching Patients Found 15 | Given I have provided an existing patient first name into the form 16 | And I have provided a name that is different than that patient's client last name into the form 17 | When I execute a patient search 18 | Then the result should be an empty list -------------------------------------------------------------------------------- /FrontDesk/ReportViewerSolution/PatientHistory.UnitTests/Features/Name Search/coding process A.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/ReportViewerSolution/PatientHistory.UnitTests/Features/Name Search/coding process A.jpg -------------------------------------------------------------------------------- /FrontDesk/ReportViewerSolution/PatientHistory.UnitTests/Helpers/DBSeedingInitializer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Data.Entity; 3 | using PatientHistory.Domain.Entities; 4 | using Repository; 5 | 6 | namespace TestsAndSpecs.Helpers 7 | { 8 | public class PatientHistoryDBSeedingInitializer : DropCreateDatabaseAlways 9 | { 10 | protected override void Seed(PatientHistoryDataContext context) 11 | { 12 | context.Patients.Add 13 | (PatientInfo.CreatePatientInfoWithHistory(0, "Sampson", "Flynn", "Newfoundland", "Dog", 120, DateTime.Now, 5, "watch tremor in rear legs")); 14 | context.Visits.Add(new Visit(1, 126, "knocked the files off of the counter again", DateTime.Now)); 15 | var checkedout = new Visit(1, 123, "knocked the files off of the counter again", DateTime.Now.AddDays(-7)); 16 | checkedout.CheckOut(); 17 | context.Visits.Add(checkedout); 18 | 19 | base.Seed(context); 20 | } 21 | 22 | 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /FrontDesk/ReportViewerSolution/PatientHistory.UnitTests/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /FrontDesk/ReportViewerSolution/PatientHistory.WebAPI/App_Start/FilterConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | using System.Web.Mvc; 3 | 4 | namespace WebAPI 5 | { 6 | public class FilterConfig 7 | { 8 | public static void RegisterGlobalFilters(GlobalFilterCollection filters) 9 | { 10 | filters.Add(new HandleErrorAttribute()); 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /FrontDesk/ReportViewerSolution/PatientHistory.WebAPI/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 WebAPI 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 = "PatientNotes", action="Index",id = UrlParameter.Optional } 20 | ); 21 | 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /FrontDesk/ReportViewerSolution/PatientHistory.WebAPI/App_Start/WebApiConfig.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web.Http; 5 | using System.Web.Mvc; 6 | 7 | namespace WebAPI 8 | { 9 | public static class WebApiConfig 10 | { 11 | public static void Register(HttpConfiguration config) 12 | { 13 | config.Routes.MapHttpRoute( 14 | name: "DefaultApi", 15 | routeTemplate: "api/{controller}/{id}", 16 | defaults: new {id = RouteParameter.Optional } 17 | ); 18 | 19 | config.Routes.MapHttpRoute( 20 | name: "FindByFirstAndLastName", 21 | routeTemplate: "api/{controller}/{first}/{last}", 22 | defaults: 23 | new 24 | { 25 | controller = "PatientNotes", 26 | first = UrlParameter.Optional, 27 | last = UrlParameter.Optional 28 | } 29 | ); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /FrontDesk/ReportViewerSolution/PatientHistory.WebAPI/Controllers/PatientNotesController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Net; 5 | using System.Net.Http; 6 | using System.Web.Http; 7 | using PatientHistory.Domain.Entities; 8 | using PatientHistory.Domain.ValueObjects; 9 | using Repository; 10 | 11 | namespace WebAPI.Controllers 12 | { 13 | public class PatientNotesController : ApiController 14 | { 15 | private readonly IPatientRepository _repo; 16 | 17 | public PatientNotesController(IPatientRepository repo) 18 | { 19 | _repo = repo; 20 | } 21 | 22 | public PatientNotesController() 23 | { 24 | 25 | } 26 | 27 | // GET api/patientnotes/Sam/Flynn 28 | public IEnumerable GetPatientList(string first, string last) 29 | { 30 | return _repo.Find(first,last); 31 | } 32 | 33 | 34 | // GET api/patientnotes/5 35 | public PatientInfo GetPatientInfoWithHistory(int id) 36 | { 37 | var pi= _repo.Find(id); 38 | return pi; 39 | } 40 | 41 | // POST api/patientnotes 42 | public void Post([FromBody]string value) 43 | { 44 | } 45 | 46 | // PUT api/patientnotes/5 47 | public void Put(int id, [FromBody]string value) 48 | { 49 | } 50 | 51 | // DELETE api/patientnotes/5 52 | public void Delete(int id) 53 | { 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /FrontDesk/ReportViewerSolution/PatientHistory.WebAPI/Controllers/PatientRepoDependency.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Web.Http.Dependencies; 4 | using Repository; 5 | using IDependencyResolver = System.Web.Http.Dependencies.IDependencyResolver; 6 | 7 | namespace WebAPI.Controllers 8 | { 9 | class PatientsNotesContainer:IDependencyResolver 10 | { 11 | static readonly IPatientRepository _repo = new PatientRepository(); 12 | 13 | public IDependencyScope BeginScope() 14 | { 15 | return this; 16 | } 17 | 18 | public object GetService(Type serviceType) 19 | { 20 | if (serviceType == typeof(PatientNotesController)) 21 | { 22 | return new PatientNotesController(_repo); 23 | } 24 | else 25 | { 26 | return null; 27 | } 28 | } 29 | 30 | public IEnumerable GetServices(Type serviceType) 31 | { 32 | return new List(); 33 | } 34 | 35 | public void Dispose(){} 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /FrontDesk/ReportViewerSolution/PatientHistory.WebAPI/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="WebAPI.MvcApplication" Language="C#" %> 2 | -------------------------------------------------------------------------------- /FrontDesk/ReportViewerSolution/PatientHistory.WebAPI/Global.asax.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Net.Http.Headers; 5 | using System.Web; 6 | using System.Web.Http; 7 | using System.Web.Mvc; 8 | using System.Web.Routing; 9 | using WebAPI.Controllers; 10 | 11 | namespace WebAPI 12 | { 13 | // Note: For instructions on enabling IIS6 or IIS7 classic mode, 14 | // visit http://go.microsoft.com/?LinkId=9394801 15 | public class MvcApplication : System.Web.HttpApplication 16 | { 17 | protected void Application_Start() 18 | { 19 | AreaRegistration.RegisterAllAreas(); 20 | 21 | WebApiConfig.Register(GlobalConfiguration.Configuration); 22 | FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); 23 | RouteConfig.RegisterRoutes(RouteTable.Routes); 24 | ConfigureApi(GlobalConfiguration.Configuration); 25 | System.Data.Entity.Database.SetInitializer(new Repository.Helpers.PatientHistoryDbSeedingInitializer()); 26 | //HibernatingRhinos.Profiler.Appender.EntityFramework.EntityFrameworkProfiler.Initialize(); 27 | } 28 | void ConfigureApi(HttpConfiguration config) 29 | { 30 | config.DependencyResolver = new PatientsNotesContainer(); 31 | config.Formatters.JsonFormatter.SupportedMediaTypes.Add(new MediaTypeHeaderValue("text/html")); 32 | 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /FrontDesk/ReportViewerSolution/PatientHistory.WebAPI/Web.Debug.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 17 | 18 | 29 | 30 | -------------------------------------------------------------------------------- /FrontDesk/ReportViewerSolution/PatientHistory.WebAPI/Web.Release.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 30 | 31 | -------------------------------------------------------------------------------- /FrontDesk/ReportViewerSolution/PatientHistory.WebAPI/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /FrontDesk/ReportViewerSolution/WebAPI.Tests/App.config: -------------------------------------------------------------------------------- 1 |  2 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /FrontDesk/ReportViewerSolution/WebAPI.Tests/Fakes/Repository.fakes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/ReportViewerSolution/WebAPI.Tests/Fakes/Repository.fakes -------------------------------------------------------------------------------- /FrontDesk/ReportViewerSolution/WebAPI.Tests/UnitTest1.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using Microsoft.VisualStudio.TestTools.UnitTesting; 3 | using PatientHistory.Domain.Entities; 4 | using PatientHistory.Domain.ValueObjects; 5 | using Repository.Fakes; 6 | 7 | namespace WebAPI.Tests 8 | { 9 | [TestClass] 10 | public class UnitTest1 11 | { 12 | //[TestMethod] 13 | //public void TestMethod1() 14 | //{ 15 | // var patientList=new PatientResultItem[]{ 16 | // new PatientResultItem("Sampson", "Flynn", "Newfoundland", "Dog", 5,1) 17 | // }; 18 | // string first; 19 | // string last; 20 | // var repo = new StubIPatientRepository() 21 | // { 22 | // FindInt32=(int) => {return new PatientInfo();} 23 | // } 24 | //} 25 | [TestMethod] 26 | public void PatientSearchReturnList() 27 | { 28 | var controller = new Controllers.PatientNotesController(); 29 | Assert.AreNotEqual(0, controller.GetPatientList("Sam", "Flynn").Count()); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /FrontDesk/ReportViewerSolution/WebAPI.Tests/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /FrontDesk/VetClinicPublic.Web/VetClinicPublic.Web.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.21005.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VetClinicPublic.Web", "VetClinicPublic.Web\VetClinicPublic.Web.csproj", "{2B8F4CB8-2C34-493A-81D4-B4223F490A31}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {2B8F4CB8-2C34-493A-81D4-B4223F490A31}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {2B8F4CB8-2C34-493A-81D4-B4223F490A31}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {2B8F4CB8-2C34-493A-81D4-B4223F490A31}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {2B8F4CB8-2C34-493A-81D4-B4223F490A31}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /FrontDesk/VetClinicPublic.Web/VetClinicPublic.Web.v12.suo.r223: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/VetClinicPublic.Web/VetClinicPublic.Web.v12.suo.r223 -------------------------------------------------------------------------------- /FrontDesk/VetClinicPublic.Web/VetClinicPublic.Web.v12.suo.r225: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/VetClinicPublic.Web/VetClinicPublic.Web.v12.suo.r225 -------------------------------------------------------------------------------- /FrontDesk/VetClinicPublic.Web/VetClinicPublic.Web/App_Start/BundleConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | using System.Web.Optimization; 3 | 4 | namespace VetClinicPublic.Web 5 | { 6 | public class BundleConfig 7 | { 8 | // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862 9 | public static void RegisterBundles(BundleCollection bundles) 10 | { 11 | bundles.Add(new ScriptBundle("~/bundles/jquery").Include( 12 | "~/Scripts/jquery-{version}.js")); 13 | 14 | bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include( 15 | "~/Scripts/jquery.validate*")); 16 | 17 | // Use the development version of Modernizr to develop with and learn from. Then, when you're 18 | // ready for production, use the build tool at http://modernizr.com to pick only the tests you need. 19 | bundles.Add(new ScriptBundle("~/bundles/modernizr").Include( 20 | "~/Scripts/modernizr-*")); 21 | 22 | bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include( 23 | "~/Scripts/bootstrap.js", 24 | "~/Scripts/respond.js")); 25 | 26 | bundles.Add(new StyleBundle("~/Content/css").Include( 27 | "~/Content/bootstrap.css", 28 | "~/Content/site.css")); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /FrontDesk/VetClinicPublic.Web/VetClinicPublic.Web/App_Start/FilterConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | using System.Web.Mvc; 3 | 4 | namespace VetClinicPublic.Web 5 | { 6 | public class FilterConfig 7 | { 8 | public static void RegisterGlobalFilters(GlobalFilterCollection filters) 9 | { 10 | filters.Add(new HandleErrorAttribute()); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /FrontDesk/VetClinicPublic.Web/VetClinicPublic.Web/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 VetClinicPublic.Web 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 | -------------------------------------------------------------------------------- /FrontDesk/VetClinicPublic.Web/VetClinicPublic.Web/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 | /* styles for validation helpers */ 20 | .field-validation-error { 21 | color: #b94a48; 22 | } 23 | 24 | .field-validation-valid { 25 | display: none; 26 | } 27 | 28 | input.input-validation-error { 29 | border: 1px solid #b94a48; 30 | } 31 | 32 | input[type="checkbox"].input-validation-error { 33 | border: 0 none; 34 | } 35 | 36 | .validation-summary-errors { 37 | color: #b94a48; 38 | } 39 | 40 | .validation-summary-valid { 41 | display: none; 42 | } -------------------------------------------------------------------------------- /FrontDesk/VetClinicPublic.Web/VetClinicPublic.Web/Controllers/AppointmentController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Web.Mvc; 3 | using VetClinicPublic.Web.AppStart; 4 | using VetClinicPublic.Web.Models; 5 | 6 | namespace VetClinicPublic.Web.Controllers 7 | { 8 | public class AppointmentController : Controller 9 | { 10 | public ActionResult Confirm(Guid id) 11 | { 12 | var messagingConfig = new MessagingConfig(); 13 | messagingConfig.SendConfirmationMessageToScheduler(new AppointmentConfirmedEvent(id)); 14 | return View(); 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /FrontDesk/VetClinicPublic.Web/VetClinicPublic.Web/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Web.Mvc; 4 | 5 | namespace VetClinicPublic.Web.Controllers 6 | { 7 | public class HomeController : Controller 8 | { 9 | public ActionResult Index() 10 | { 11 | return View(); 12 | } 13 | 14 | } 15 | } -------------------------------------------------------------------------------- /FrontDesk/VetClinicPublic.Web/VetClinicPublic.Web/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="VetClinicPublic.Web.MvcApplication" Language="C#" %> 2 | -------------------------------------------------------------------------------- /FrontDesk/VetClinicPublic.Web/VetClinicPublic.Web/Global.asax.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Web.Mvc; 4 | using System.Web.Optimization; 5 | using System.Web.Routing; 6 | using VetClinicPublic.Web.AppStart; 7 | 8 | namespace VetClinicPublic.Web 9 | { 10 | public class MvcApplication : System.Web.HttpApplication 11 | { 12 | protected void Application_Start() 13 | { 14 | AreaRegistration.RegisterAllAreas(); 15 | FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); 16 | RouteConfig.RegisterRoutes(RouteTable.Routes); 17 | BundleConfig.RegisterBundles(BundleTable.Bundles); 18 | 19 | MessagingConfig.StartCheckingMessages(); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /FrontDesk/VetClinicPublic.Web/VetClinicPublic.Web/Interfaces/ISendConfirmationEmails.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using VetClinicPublic.Web.Models; 4 | 5 | namespace VetClinicPublic.Web.Interfaces 6 | { 7 | public interface ISendConfirmationEmails 8 | { 9 | void SendConfirmationEmail(AppointmentDTO appointment); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /FrontDesk/VetClinicPublic.Web/VetClinicPublic.Web/Models/AppointmentConfirmedEvent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace VetClinicPublic.Web.Models 4 | { 5 | public class AppointmentConfirmedEvent 6 | { 7 | public AppointmentConfirmedEvent(Guid appointmentId) 8 | { 9 | this.Id = Guid.NewGuid(); 10 | DateTimeEventOccurred = DateTime.Now; 11 | this.AppointmentId = appointmentId; 12 | } 13 | 14 | public Guid Id { get; private set; } 15 | public DateTime DateTimeEventOccurred { get; set; } 16 | public Guid AppointmentId { get; set; } 17 | public string EventType 18 | { 19 | get 20 | { 21 | return "AppointmentConfirmedEvent"; 22 | } 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /FrontDesk/VetClinicPublic.Web/VetClinicPublic.Web/Models/AppointmentDTO.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace VetClinicPublic.Web.Models 4 | { 5 | public class AppointmentDTO 6 | { 7 | public Guid AppointmentId { get; set; } 8 | public string ClientName { get; set; } 9 | public string ClientEmailAddress { get; set; } 10 | public string PatientName { get; set; } 11 | public string DoctorName { get; set; } 12 | public string AppointmentType { get; set; } 13 | public DateTime Start { get; set; } 14 | public DateTime End { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /FrontDesk/VetClinicPublic.Web/VetClinicPublic.Web/Models/AppointmentScheduledEvent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace VetClinicPublic.Web.Models 4 | { 5 | public class AppointmentScheduledEvent 6 | { 7 | public AppointmentScheduledEvent(AppointmentDTO appointment) : this() 8 | { 9 | AppointmentScheduled = appointment; 10 | } 11 | 12 | public AppointmentScheduledEvent() 13 | { 14 | DateTimeEventOccurred = DateTime.Now; 15 | } 16 | 17 | public DateTime DateTimeEventOccurred { get; set; } 18 | public AppointmentDTO AppointmentScheduled { get; set; } 19 | public string EventType 20 | { 21 | get 22 | { 23 | return "AppointmentScheduledEvent"; 24 | } 25 | } 26 | } 27 | 28 | } -------------------------------------------------------------------------------- /FrontDesk/VetClinicPublic.Web/VetClinicPublic.Web/Models/IdentityModels.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNet.Identity.EntityFramework; 2 | 3 | namespace VetClinicPublic.Web.Models 4 | { 5 | // You can add profile data for the user by adding more properties to your ApplicationUser class, please visit http://go.microsoft.com/fwlink/?LinkID=317594 to learn more. 6 | public class ApplicationUser : IdentityUser 7 | { 8 | } 9 | 10 | public class ApplicationDbContext : IdentityDbContext 11 | { 12 | public ApplicationDbContext() 13 | : base("DefaultConnection") 14 | { 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /FrontDesk/VetClinicPublic.Web/VetClinicPublic.Web/Scripts/_references.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/VetClinicPublic.Web/VetClinicPublic.Web/Scripts/_references.js -------------------------------------------------------------------------------- /FrontDesk/VetClinicPublic.Web/VetClinicPublic.Web/Services/SendConfirmationEmails.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using VetClinicPublic.Web.Interfaces; 4 | using System.Net.Mail; 5 | 6 | namespace VetClinicPublic.Web.Services 7 | { 8 | public class SendConfirmationEmails : ISendConfirmationEmails 9 | { 10 | public void SendConfirmationEmail(Models.AppointmentDTO appointment) 11 | { 12 | using (var client = new SmtpClient("localhost")) 13 | { 14 | var mailMessage = new MailMessage(); 15 | mailMessage.To.Add(appointment.ClientEmailAddress); 16 | mailMessage.From = new MailAddress("donotreply@thevetclinic.com"); 17 | mailMessage.Subject = "Vet Appointment Confirmation for " + appointment.PatientName; 18 | mailMessage.IsBodyHtml = true; 19 | mailMessage.Body = String.Format("Dear {0},

Please click the link below to confirm {1}'s appointment for a {2} with {3} on {4}.

Thanks!

CONFIRM

Please call the office to reschedule if you will be unable to make it for your appointment.

Have a great day!

", appointment.ClientName, appointment.PatientName, appointment.AppointmentType, appointment.DoctorName, appointment.Start.ToString(), "http://localhost:51322/appointment/confirm/" + appointment.AppointmentId); 20 | client.Send(mailMessage); 21 | } 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /FrontDesk/VetClinicPublic.Web/VetClinicPublic.Web/Startup.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Owin; 2 | using Owin; 3 | 4 | [assembly: OwinStartupAttribute(typeof(VetClinicPublic.Web.Startup))] 5 | namespace VetClinicPublic.Web 6 | { 7 | public partial class Startup 8 | { 9 | public void Configuration(IAppBuilder app) 10 | { 11 | ConfigureAuth(app); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /FrontDesk/VetClinicPublic.Web/VetClinicPublic.Web/Views/Appointment/Confirm.cshtml: -------------------------------------------------------------------------------- 1 |  2 | @{ 3 | ViewBag.Title = "Confirm"; 4 | } 5 | 6 |

Appointment Confirmed

7 | 8 |

9 | Thank you! 10 |

11 | -------------------------------------------------------------------------------- /FrontDesk/VetClinicPublic.Web/VetClinicPublic.Web/Views/Home/Index.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Vet Clinic"; 3 | } 4 | 5 |
6 |

Your Vet Clinic

7 |

Taking great care of your pets

8 |
9 | 10 | @*
11 |
12 |

Getting started

13 |

14 | ASP.NET MVC gives you a powerful, patterns-based way to build dynamic websites that 15 | enables a clean separation of concerns and gives you full control over markup 16 | for enjoyable, agile development. 17 |

18 |

Learn more »

19 |
20 |
21 |

Get more libraries

22 |

NuGet is a free Visual Studio extension that makes it easy to add, remove, and update libraries and tools in Visual Studio projects.

23 |

Learn more »

24 |
25 |
26 |

Web Hosting

27 |

You can easily find a web hosting company that offers the right mix of features and price for your applications.

28 |

Learn more »

29 |
30 |
*@ -------------------------------------------------------------------------------- /FrontDesk/VetClinicPublic.Web/VetClinicPublic.Web/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 | -------------------------------------------------------------------------------- /FrontDesk/VetClinicPublic.Web/VetClinicPublic.Web/Views/Shared/_LoginPartial.cshtml: -------------------------------------------------------------------------------- 1 | @using Microsoft.AspNet.Identity 2 | @if (Request.IsAuthenticated) 3 | { 4 | using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm", @class = "navbar-right" })) 5 | { 6 | @Html.AntiForgeryToken() 7 | 8 | 14 | } 15 | } 16 | else 17 | { 18 | 22 | } 23 | -------------------------------------------------------------------------------- /FrontDesk/VetClinicPublic.Web/VetClinicPublic.Web/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "~/Views/Shared/_Layout.cshtml"; 3 | } 4 | -------------------------------------------------------------------------------- /FrontDesk/VetClinicPublic.Web/VetClinicPublic.Web/Web.Debug.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 17 | 18 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /FrontDesk/VetClinicPublic.Web/VetClinicPublic.Web/Web.Release.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /FrontDesk/VetClinicPublic.Web/VetClinicPublic.Web/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/VetClinicPublic.Web/VetClinicPublic.Web/favicon.ico -------------------------------------------------------------------------------- /FrontDesk/VetClinicPublic.Web/VetClinicPublic.Web/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/VetClinicPublic.Web/VetClinicPublic.Web/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /FrontDesk/VetClinicPublic.Web/VetClinicPublic.Web/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/VetClinicPublic.Web/VetClinicPublic.Web/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /FrontDesk/VetClinicPublic.Web/VetClinicPublic.Web/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/VetClinicPublic.Web/VetClinicPublic.Web/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /FrontDesk/lib/common/Common.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/lib/common/Common.dll -------------------------------------------------------------------------------- /FrontDesk/lib/nunit/NUnit.VisualStudio.TestAdapter.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/lib/nunit/NUnit.VisualStudio.TestAdapter.dll -------------------------------------------------------------------------------- /FrontDesk/lib/nunit/nunit-console-runner.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/lib/nunit/nunit-console-runner.dll -------------------------------------------------------------------------------- /FrontDesk/lib/nunit/nunit-console-x86.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/lib/nunit/nunit-console-x86.exe -------------------------------------------------------------------------------- /FrontDesk/lib/nunit/nunit-console-x86.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /FrontDesk/lib/nunit/nunit-console.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/lib/nunit/nunit-console.exe -------------------------------------------------------------------------------- /FrontDesk/lib/nunit/nunit-console.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /FrontDesk/lib/nunit/nunit.core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/lib/nunit/nunit.core.dll -------------------------------------------------------------------------------- /FrontDesk/lib/nunit/nunit.core.interfaces.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/lib/nunit/nunit.core.interfaces.dll -------------------------------------------------------------------------------- /FrontDesk/lib/nunit/nunit.framework.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/lib/nunit/nunit.framework.dll -------------------------------------------------------------------------------- /FrontDesk/lib/nunit/nunit.util.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/FrontDesk/lib/nunit/nunit.util.dll -------------------------------------------------------------------------------- /Julie Lerman - Domain-Driven Design for the Database-Driven Mind.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/julielerman/DomainDrivenDesignforDatabaseDrivenMind/4122b0aa946083295b92db67b28f0097d7d841f5/Julie Lerman - Domain-Driven Design for the Database-Driven Mind.pdf -------------------------------------------------------------------------------- /ReadMe..txt: -------------------------------------------------------------------------------- 1 | Demos and PowerPoints for Julie Lerman's "Domain-Driven Design for the Database Driven Mind" presentation. 2 | This talk was given at MS Ignite(May 7, 2015), Techorama (May 2015) and DevSum15 (May 2015). 3 | 4 | The talk was recorded at MS Ignite and can be viewed on Channel 9. 5 | 6 | The demo is a subset of the full sample application created by Steve Smith (@ardalis) and myself for our "Domain Driven Design Fundamentals" course on Pluralsight.com (bit.ly/PS-DDD). 7 | 8 | The Pluralsight course sample includes the front end web app of the application and is a full working demo. 9 | 10 | This version does not include the project for the UI but it does include some extra code. 11 | 1) A project with the tests that were uses for this presentation. 12 | 2) some additional classes and an extra DbContext to demonstrate the use of a domain model plus a persistence model. The extra classes are in the AppointmentScheduling/Infrastructure/AppointmentSchedule.Data project. In there check the "Persistence Model" folder for the classes used as a persistence model classes and also the SchedulingPersistenceContext class which wraps these classes into a DbContext. 13 | 14 | The full working sample for the Pluralsight course is available as a download for Pro Subscribers. The course goes into detail about the full sample, while I only focused on particular bits of it for the DDD for the DB Driven Mind presentation. 15 | 16 | Enjoy! 17 | 18 | 19 | Julie Lerman 20 | thedatafarm.com 21 | @julielerman 22 | 23 | --------------------------------------------------------------------------------