{"id":20081902,"url":"https://github.com/jke94/hospital-management","last_synced_at":"2026-04-30T07:36:41.427Z","repository":{"id":54388453,"uuid":"340708851","full_name":"jke94/Hospital-Management","owner":"jke94","description":"A hospital database made with Entity Framework Core.","archived":false,"fork":false,"pushed_at":"2021-02-21T17:15:50.000Z","size":89,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-13T01:44:22.699Z","etag":null,"topics":["csharp","database","efcore","efcore31"],"latest_commit_sha":null,"homepage":"https://github.com/jke94/Hospital-Management","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jke94.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-20T17:11:41.000Z","updated_at":"2023-02-25T21:45:30.000Z","dependencies_parsed_at":"2022-08-13T14:10:40.567Z","dependency_job_id":null,"html_url":"https://github.com/jke94/Hospital-Management","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jke94%2FHospital-Management","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jke94%2FHospital-Management/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jke94%2FHospital-Management/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jke94%2FHospital-Management/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jke94","download_url":"https://codeload.github.com/jke94/Hospital-Management/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241515953,"owners_count":19975140,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","database","efcore","efcore31"],"created_at":"2024-11-13T15:40:53.807Z","updated_at":"2026-04-30T07:36:36.405Z","avatar_url":"https://github.com/jke94.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"#  Hospital-Management\n\n\nA hospital database made with Entity Framework Core. \nUsing [Entity Framework Core Tools](https://docs.microsoft.com/en-us/ef/core/cli/powershell), with Package Manager Console with Visual Studio Community 2019 to create and build the database.\n\nThe goald of this project it´s build a database to apply the [Entity Framework Core Data Seeding](https://docs.microsoft.com/es-es/ef/core/modeling/data-seeding). A powerfull technology to have a snapchots of the model of the database and inyect data in the database with an easy way\n- 😃 See in 'DataSeeding' the classes used to generate randomly data and 'HospitalDataContext.cs' file to see how with the overried 'OnModelCreating' function you can inject the data.\n```\n    protected override void OnModelCreating(ModelBuilder modelBuilder)\n    {\n        modelBuilder.Entity\u003cDoctor\u003e().HasData(DoctorDataSeeded.GenerateRandomDoctors());\n\n        modelBuilder.Entity\u003cPatient\u003e().HasData(PatientDataSeeded.GenerateRandomPatients());\n\n        modelBuilder.Entity\u003cMedicalTreatment\u003e().HasData(MedicalTreatmentDataSeeded.GenerateMedicalTreatment());\n    }\n```\n## Description\n\nThis project is composed by two projects:\n\n - 'HospitalConsole' project: A simple console command line to play with the database.\n - 'DataModel' project: It containts the database context, the models and migration of the database.\n\n## Getting Started\n\n### Dependencies or tool necesaries\n\n* Visual Studio Community 2019\n* .NET 5.0\n* Sql Server Express Localdb\n\n### Installing\n\n* Clone project.\n* Open Hospital.sln\n\n\n### UpdateDatabase and apply the migration 'MigrationV0'.\n\n1. Select DataModel project and 'Set as Startup Project'\n2. Open \"Package Manager Console\" view in Visual Studio.\n3. Select as 'Default Project', 'DataModel', into the \"Package Manager Console\" view.\n4. The solution have instaled several NuGet Packages, one of them, [Microsoft.EntityFrameworkCore.Tools](https://www.nuget.org/packages/Microsoft.EntityFrameworkCore.Tools). Use 'Update-Database' command to apply the migration 'MigrationV0'. By default, 'Update-Database' command apply the last migration into 'Migrations' folder.\n5. Play your way, in the 'HospitalConsole' project to access to the data. There is a example in the code.\n\n## Help\n\nAny advise for common problems or issues.\n\n\n## Authors\n\nJavier Carracedo \n\nTwitter Profile: [@JaviKarra94](https://twitter.com/JaviKarra94)\n\n## Version History\n\n\n## License\n\nThis project is licensed under the [NAME HERE] License - see the LICENSE.md file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjke94%2Fhospital-management","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjke94%2Fhospital-management","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjke94%2Fhospital-management/lists"}