private void SeedRooms(MyDbContext context) { List <int> operation = new List <int> { 14, 15, 16, 18, 19, 41, 42, 55, 56, 57, 58, 59, 60 }; List <int> sick = new List <int> { 32, 33, 34, 35, 36, 37, 38, 39, 40 }; SeedConsultingRooms(context); foreach (int id in operation) { context.Add(new Room { Id = id, Usage = TypeOfUsage.OPERATION_ROOM }); } foreach (int id in sick) { context.Add(new Room { Id = id, Usage = TypeOfUsage.SICKROOM }); } context.SaveChanges(); }
private void SeedSpecialties(MyDbContext context) { context.Add(new Specialty() { Name = "Epidemiolog" }); context.Add(new Specialty() { Name = "Stomatolog" }); context.Add(new Specialty() { Name = "Neurolog" }); context.Add(new Specialty() { Name = "Kardiolog" }); context.Add(new Specialty() { Name = "Opšti" }); context.SaveChanges(); }
private void SeedActionBenefits(MyDbContext context) { context.Add(new ActionBenefit() { Id = 1, PharmacyId = 1, Message = new ActionBenefitMessage("Novogodišnji popust", "Kapi za oči Proculin Tears na popustu 30%"), IsPublic = true }); context.Add(new ActionBenefit() { Id = 2, PharmacyId = 1, Message = new ActionBenefitMessage("Popust na penzionere", "Renomal gel za zglobove na popustu 40%"), IsPublic = true }); context.Add(new ActionBenefit() { Id = 3, PharmacyId = 1, Message = new ActionBenefitMessage("Novogodišnji popust", "Corega pasta za protezu na popustu 50%"), IsPublic = true }); context.SaveChanges(); }
private void SeedPatientsAndPatientsCard(MyDbContext context) { context.Add(new Patient() { Jmbg = "1309998775018", Name = "Ana", Surname = "Anić", DateOfBirth = new DateTime(1998, 9, 13), Gender = GenderType.F, CityZipCode = 1, Email = "*****@*****.**", HomeAddress = "Tolstojeva 12", Password = "******", DateOfRegistration = DateTime.Now, IsActive = true, IsBlocked = false, IsGuest = false, Phone = "065897520", Username = "******", ImageName = "/Uploads/picture1.jpg" }); context.Add(new Patient() { Jmbg = "2711998896320", Name = "Žana", Surname = "Žanić", DateOfBirth = new DateTime(1998, 11, 27), Gender = GenderType.M, CityZipCode = 1, Email = "*****@*****.**", HomeAddress = "Bulevar Oslobođenja 100", Password = "******", DateOfRegistration = DateTime.Now, IsActive = true, IsBlocked = false, IsGuest = false, Phone = "065897520", Username = "******", ImageName = "/Uploads/profile_pic.jpg" }); context.SaveChanges(); context.Add(new PatientCard() { PatientJmbg = "2711998896320", BloodType = BloodType.B, RhFactor = RhFactorType.POSITIVE, HasInsurance = false }); context.Add(new PatientCard() { PatientJmbg = "1309998775018", BloodType = BloodType.A, RhFactor = RhFactorType.POSITIVE, HasInsurance = false }); context.SaveChanges(); }
private void AddEquipmentInExamination(MyDbContext context, int roomId, int examinationId) { List <EquipmentInRooms> equipmentInRooms = context.EquipmentsInRooms.Where(e => e.RoomNumber == roomId).ToList(); List <EquipmentType> equipmentTypes = new List <EquipmentType>(); foreach (EquipmentInRooms equ in equipmentInRooms) { Equipment equipment = context.Equipment.Where(e => e.Id == equ.IdEquipment).First(); equipmentTypes.Add(context.EquipmentTypes.Where(e => e.Id == equipment.TypeId).First()); } List <int> addedEquipment = new List <int>(); for (int i = 0; i < RandomGenerator.Next(0, equipmentTypes.Count); i++) { int equipmentTypeId = equipmentTypes[RandomGenerator.Next(0, equipmentTypes.Count)].Id; if (!addedEquipment.Contains(equipmentTypeId)) { context.Add(new EquipmentInExamination { ExaminationId = examinationId, EquipmentTypeID = equipmentTypeId }); addedEquipment.Add(equipmentTypeId); } } context.SaveChanges(); }
private void SeedDrugTypes(MyDbContext context) { context.Add(new DrugType() { Type = "tableta", Purpose = "lek za glavu" }); context.Add(new DrugType() { Type = "tableta", Purpose = "lek za temperaturu" }); context.Add(new DrugType() { Type = "kapsula", Purpose = "probiotik" }); context.SaveChanges(); }
private void SeedConsultingRooms(MyDbContext context) { List <int> consulting = new List <int> { 9, 12, 13, 20, 21, 25, 49, 50, 51, 52, 53, 54 }; List <EquipmentType> equipmentTypes = context.EquipmentTypes.ToList(); List <List <EquipmentType> > equipmentTypesInRooms = new List <List <EquipmentType> >(); equipmentTypesInRooms.Add(new List <EquipmentType> { equipmentTypes[0], equipmentTypes[2], equipmentTypes[5], equipmentTypes[7] }); equipmentTypesInRooms.Add(new List <EquipmentType> { equipmentTypes[1], equipmentTypes[3], equipmentTypes[4] }); equipmentTypesInRooms.Add(new List <EquipmentType> { equipmentTypes[2], equipmentTypes[6] }); equipmentTypesInRooms.Add(new List <EquipmentType> { equipmentTypes[1], equipmentTypes[2], equipmentTypes[3] }); equipmentTypesInRooms.Add(new List <EquipmentType> { equipmentTypes[5], equipmentTypes[6] }); equipmentTypesInRooms.Add(new List <EquipmentType> { equipmentTypes[1], equipmentTypes[7] }); equipmentTypesInRooms.Add(new List <EquipmentType> { equipmentTypes[1], equipmentTypes[2], equipmentTypes[6], equipmentTypes[7] }); equipmentTypesInRooms.Add(new List <EquipmentType> { equipmentTypes[0], equipmentTypes[5], equipmentTypes[6] }); equipmentTypesInRooms.Add(new List <EquipmentType> { equipmentTypes[4], equipmentTypes[5] }); equipmentTypesInRooms.Add(new List <EquipmentType> { equipmentTypes[0], equipmentTypes[2], equipmentTypes[7] }); equipmentTypesInRooms.Add(new List <EquipmentType> { equipmentTypes[5], equipmentTypes[6] }); equipmentTypesInRooms.Add(new List <EquipmentType> { equipmentTypes[0], equipmentTypes[4] }); for (int i = 0; i < consulting.Count; i++) { context.Add(new Room { Id = consulting[i], Usage = TypeOfUsage.CONSULTING_ROOM }); foreach (EquipmentType equipmentType in equipmentTypesInRooms[i]) { AddEquipmentToRoom(context, consulting[i], equipmentType); } } }
private void SeedRenovations(MyDbContext context) { context.Add(new BaseRenovation(12, new RenovationPeriod(new DateTime(2021, 3, 12, 15, 10, 0, DateTimeKind.Utc), new DateTime(2021, 3, 12, 15, 45, 0, DateTimeKind.Utc)), "krecenje", TypeOfRenovation.REGULAR_RENOVATION)); context.Add(new BaseRenovation(13, new RenovationPeriod(new DateTime(2021, 3, 12, 13, 40, 0, DateTimeKind.Utc), new DateTime(2021, 3, 12, 14, 45, 0, DateTimeKind.Utc)), "menjanje poda", TypeOfRenovation.REGULAR_RENOVATION)); context.Add(new BaseRenovation(55, new RenovationPeriod(new DateTime(2021, 3, 12, 12, 10, 0, DateTimeKind.Utc), new DateTime(2021, 3, 12, 15, 45, 0, DateTimeKind.Utc)), "krecenje", TypeOfRenovation.REGULAR_RENOVATION)); context.Add(new BaseRenovation(56, new RenovationPeriod(new DateTime(2021, 3, 12, 11, 20, 0, DateTimeKind.Utc), new DateTime(2021, 3, 12, 12, 45, 0, DateTimeKind.Utc)), "krecenje", TypeOfRenovation.REGULAR_RENOVATION)); context.Add(new MergeRenovation(new RenovationPeriod(new DateTime(2021, 4, 12, 11, 20, 0, DateTimeKind.Utc), new DateTime(2021, 4, 12, 12, 45, 0, DateTimeKind.Utc)), "gletovanje", TypeOfRenovation.MERGE_RENOVATION, 49, 50, "soba za konsultacija", TypeOfUsage.CONSULTING_ROOM)); context.Add(new MergeRenovation(new RenovationPeriod(new DateTime(2021, 4, 9, 11, 20, 0, DateTimeKind.Utc), new DateTime(2021, 4, 10, 12, 45, 0, DateTimeKind.Utc)), "menjanje instalacije", TypeOfRenovation.MERGE_RENOVATION, 51, 52, "soba za konsultacija", TypeOfUsage.CONSULTING_ROOM)); context.Add(new MergeRenovation(new RenovationPeriod(new DateTime(2021, 4, 10, 11, 20, 0, DateTimeKind.Utc), new DateTime(2021, 4, 11, 12, 45, 0, DateTimeKind.Utc)), "plafonjera", TypeOfRenovation.MERGE_RENOVATION, 56, 57, "soba za konsultacija", TypeOfUsage.CONSULTING_ROOM)); context.Add(new DivideRenovation(new RenovationPeriod(new DateTime(2021, 4, 12, 11, 20, 0, DateTimeKind.Utc), new DateTime(2021, 4, 12, 12, 45, 0, DateTimeKind.Utc)), "gletovanje", TypeOfRenovation.MERGE_RENOVATION, 18, "soba za konsultacija", "soba za operaciju", TypeOfUsage.CONSULTING_ROOM, TypeOfUsage.OPERATION_ROOM)); context.Add(new DivideRenovation(new RenovationPeriod(new DateTime(2021, 4, 9, 11, 20, 0, DateTimeKind.Utc), new DateTime(2021, 4, 10, 12, 45, 0, DateTimeKind.Utc)), "menjanje instalacije", TypeOfRenovation.MERGE_RENOVATION, 19, "soba za konsultacija", "soba za operaciju", TypeOfUsage.CONSULTING_ROOM, TypeOfUsage.OPERATION_ROOM)); context.SaveChanges(); }
private void AddEquipmentToRoom(MyDbContext context, int roomId, EquipmentType equipmentType) { int id = context.Equipment.Count() + 1; int quantity = RandomGenerator.Next(1, 10); context.Add(new Equipment() { TypeId = equipmentType.Id, Quantity = quantity }); context.SaveChanges(); context.Add(new EquipmentInRooms() { IdEquipment = id, RoomNumber = roomId, Quantity = quantity }); context.SaveChanges(); }
private void SeedCountries(MyDbContext context) { context.Add(new Country() { Name = "Srbija" }); context.Add(new Country() { Name = "Crna Gora" }); context.Add(new Country() { Name = "BiH" }); context.Add(new Country() { Name = "Hrvatska" }); context.SaveChanges(); }
public void Add(Patient patient) { try { var memento = patient.GetMemento(); _context.Add(new Backend.Model.Users.Patient() { Jmbg = memento.Jmbg, Name = memento.Name, Surname = memento.Surname, IsGuest = true }); _context.SaveChanges(); _context.Add(new Backend.Model.Users.PatientCard() { PatientJmbg = memento.Jmbg, BloodType = memento.BloodType.ToBackendBloodType(), RhFactor = memento.RhFactor.ToBackendRhFactor(), Alergies = memento.Allergies, MedicalHistory = memento.MedicalHistory, HasInsurance = !String.IsNullOrWhiteSpace(memento.InsuranceNumber), Lbo = memento.InsuranceNumber }); _context.SaveChanges(); } catch (PatientServiceException) { throw; } catch (DbUpdateException e) { throw new ValidationException(e.Message); } catch (Exception e) { throw new DataStorageException(e.Message); } }
private void SeedDrugs(MyDbContext context) { context.Add(new Drug() { DrugType_Id = 1, Name = "Brufen", Quantity = RandomGenerator.Next(5, 30), ExpirationDate = new DateTime(2021, 12, 13, 1, 8, 57), Producer = "Hemofarm" }); context.Add(new Drug() { DrugType_Id = 2, Name = "Metafeks", Quantity = RandomGenerator.Next(5, 30), ExpirationDate = new DateTime(2021, 12, 13, 1, 8, 57), Producer = "Hemofarm" }); context.Add(new Drug() { DrugType_Id = 1, Name = "Aspirin", Quantity = RandomGenerator.Next(5, 30), ExpirationDate = new DateTime(2021, 12, 13, 1, 8, 57), Producer = "Galenika" }); context.Add(new Drug() { DrugType_Id = 3, Name = "Bulardi", Quantity = RandomGenerator.Next(5, 30), ExpirationDate = new DateTime(2021, 12, 13, 1, 8, 57), Producer = "Hemofarm" }); context.SaveChanges(); }
private void SeedPharmacies(MyDbContext context) { context.Add(new PharmacySystem() { Name = "Janković", ApiKey = "ApiKey1", Url = "http://*****:*****@mail.com", ActionsBenefitsExchangeName = "exchange", ActionsBenefitsSubscribed = true, GrpcAdress = new GrpcAdress("localhost", 30051) }); context.SaveChanges(); }
private void SeedFeedback(MyDbContext context) { context.Add(new Feedback() { CommentatorJmbg = "1309998775018", Comment = "Sve je super.", IsAllowedToPublish = true, IsPublished = true, SendingDate = new DateTime(2020, 10, 01) }); context.Add(new Feedback() { CommentatorJmbg = "1309998775018", Comment = "Sviđa mi se Vaša bolnica.", IsAllowedToPublish = true, IsPublished = false, SendingDate = new DateTime(2020, 10, 13) }); context.Add(new Feedback() { CommentatorJmbg = "2711998896320", Comment = "Odlična usluga.", IsAllowedToPublish = true, IsPublished = true, SendingDate = new DateTime(2020, 11, 05) }); context.Add(new Feedback() { CommentatorJmbg = "2711998896320", Comment = "Zadovoljan sam uslugama.", IsAllowedToPublish = true, IsPublished = false, SendingDate = new DateTime(2020, 11, 13) }); context.Add(new Feedback() { CommentatorJmbg = null, Comment = "Najbolji ste, sve pohvale!", IsAllowedToPublish = true, IsPublished = true, SendingDate = new DateTime(2020, 12, 06) }); context.Add(new Feedback() { CommentatorJmbg = null, Comment = "Nisam zadovoljan.", IsAllowedToPublish = false, IsPublished = false, SendingDate = new DateTime(2020, 12, 18) }); context.SaveChanges(); }
private void SeedAdmins(MyDbContext context) { context.Add(new Admin() { Jmbg = "0811965521021", Name = "Milan", Surname = "Milić", DateOfBirth = new DateTime(1965, 11, 08), Phone = "021954201", Email = "*****@*****.**", HomeAddress = "Aleja Svetog Save 100", Username = "******", CityZipCode = 3, Gender = GenderType.M, Password = "******" }); context.SaveChanges(); }
private void SeedTherapies(MyDbContext context) { List <Examination> previous = context.Examinations.Where(e => e.ExaminationStatus == ExaminationStatus.FINISHED).ToList(); int maxDrugId = context.Drugs.Count() + 1; foreach (Examination e in previous) { context.Add(new Therapy() { IdExamination = e.Id, Diagnosis = e.Anamnesis, StartDate = e.DateAndTime, EndDate = e.DateAndTime.AddDays(RandomGenerator.Next(1, 10)), DailyDose = RandomGenerator.Next(1, 5), IdDrug = RandomGenerator.Next(1, maxDrugId) }); } context.SaveChanges(); }
private void SeedDrugsInRooms(MyDbContext context) { foreach (Room room in context.Rooms) { foreach (Drug drug in context.Drugs) { if (RandomGenerator.Next(2) == 1) { context.Add(new DrugInRoom() { DrugId = drug.Id, RoomNumber = room.Id, Quantity = RandomGenerator.Next(10, 20) }); } } } context.SaveChanges(); }
private void SeedEquipmentTypes(MyDbContext context) { context.Add(new EquipmentType() { Name = "needle", IsConsumable = true }); context.Add(new EquipmentType() { Name = "bend", IsConsumable = true }); context.Add(new EquipmentType() { Name = "mask", IsConsumable = true }); context.Add(new EquipmentType() { Name = "bed", IsConsumable = false }); context.Add(new EquipmentType() { Name = "table", IsConsumable = false }); context.Add(new EquipmentType() { Name = "computer", IsConsumable = false }); context.Add(new EquipmentType() { Name = "chair", IsConsumable = false }); context.Add(new EquipmentType() { Name = "instrument", IsConsumable = false }); context.SaveChanges(); }
private void SeedCities(MyDbContext context) { context.Add(new City() { Name = "Beograd", CountryId = 1 }); context.Add(new City() { Name = "Novi Sad", CountryId = 1 }); context.Add(new City() { Name = "Subotica", CountryId = 1 }); context.Add(new City() { Name = "Podgorica", CountryId = 2 }); context.Add(new City() { Name = "Budva", CountryId = 2 }); context.Add(new City() { Name = "Banja Luka", CountryId = 3 }); context.Add(new City() { Name = "Sarajevo", CountryId = 3 }); context.Add(new City() { Name = "Zagreb", CountryId = 4 }); context.SaveChanges(); }
private void SeedDrugConsumptions(MyDbContext context) { DateTime startDate = DateTime.Now; DateTime endDate = DateTime.Now.AddDays(10); for (DateTime current = startDate; current < endDate; current = current.AddDays(1)) { foreach (Drug drug in context.Drugs) { if (RandomGenerator.Next(2) == 1) { context.Add(new DrugConsumption() { DrugId = drug.Id, Date = current, Quantity = RandomGenerator.Next(5, 20) }); } } } context.SaveChanges(); }
private void SeedExaminations(MyDbContext context) { Doctor doctor = context.Doctors.Find("8520147896320"); PatientCard patientCard = context.PatientCards.Find(2); Room room = context.Rooms.Where(r => r.Usage.Equals(TypeOfUsage.CONSULTING_ROOM)).First(); DateTime start = DateTime.Now.Date.AddDays(10).AddHours(7); DateTime end = DateTime.Now.Date.AddDays(13).AddHours(17); for (DateTime current = start; current < end; current = current.AddMinutes(30)) { if (CheckIfTimeValid(current)) { int examinationId = context.Examinations.Count(); context.Add(new Examination { Type = TypeOfExamination.GENERAL, DoctorJmbg = doctor.Jmbg, IdPatientCard = patientCard.Id, IdRoom = room.Id, DateAndTime = current, IsSurveyCompleted = false, ExaminationStatus = ExaminationStatus.CREATED }); AddEquipmentInExamination(context, room.Id, examinationId); continue; } current = new DateTime(current.Year, current.Month, current.Day, 6, 30, 0); current = current.AddDays(1); } context.Add(new Examination { Type = TypeOfExamination.GENERAL, DoctorJmbg = doctor.Jmbg, IdPatientCard = patientCard.Id, IdRoom = room.Id, DateAndTime = DateTime.Now.Date.AddDays(-10).AddHours(8).AddMinutes(30), IsSurveyCompleted = false, ExaminationStatus = ExaminationStatus.CANCELED }); context.Add(new Examination { Type = TypeOfExamination.GENERAL, DoctorJmbg = doctor.Jmbg, IdPatientCard = patientCard.Id, IdRoom = room.Id, DateAndTime = DateTime.Now.Date.AddDays(-12).AddHours(10), IsSurveyCompleted = false, ExaminationStatus = ExaminationStatus.CANCELED }); context.Add(new Examination { Type = TypeOfExamination.GENERAL, DoctorJmbg = doctor.Jmbg, IdPatientCard = patientCard.Id, IdRoom = room.Id, DateAndTime = DateTime.Now.Date.AddDays(-15).AddHours(12).AddMinutes(30), IsSurveyCompleted = false, ExaminationStatus = ExaminationStatus.CANCELED }); patientCard = context.PatientCards.Find(1); Doctor doctor1 = context.Doctors.Find("0606988520123"); Doctor doctor2 = context.Doctors.Find("0323970501235"); context.Add(new Examination { Type = TypeOfExamination.GENERAL, DoctorJmbg = doctor.Jmbg, IdPatientCard = patientCard.Id, IdRoom = room.Id, DateAndTime = DateTime.Now.Date.AddDays(-15).AddHours(14), IsSurveyCompleted = true, ExaminationStatus = ExaminationStatus.FINISHED, Anamnesis = "Sinuzitis" }); context.Add(new Examination { Type = TypeOfExamination.GENERAL, DoctorJmbg = doctor1.Jmbg, IdPatientCard = patientCard.Id, IdRoom = room.Id, DateAndTime = DateTime.Now.Date.AddDays(-10).AddHours(9).AddMinutes(30), IsSurveyCompleted = false, ExaminationStatus = ExaminationStatus.FINISHED, Anamnesis = "Upala uha" }); context.Add(new Examination { Type = TypeOfExamination.GENERAL, DoctorJmbg = doctor2.Jmbg, IdPatientCard = patientCard.Id, IdRoom = room.Id, DateAndTime = DateTime.Now.Date.AddDays(-5).AddHours(11).AddMinutes(30), IsSurveyCompleted = false, ExaminationStatus = ExaminationStatus.FINISHED, Anamnesis = "Upala pluća" }); context.Add(new Examination { Type = TypeOfExamination.GENERAL, DoctorJmbg = doctor1.Jmbg, IdPatientCard = patientCard.Id, IdRoom = room.Id, DateAndTime = DateTime.Now.Date.AddDays(1).AddHours(10).AddMinutes(30), IsSurveyCompleted = false, ExaminationStatus = ExaminationStatus.CREATED }); context.Add(new Examination { Type = TypeOfExamination.GENERAL, DoctorJmbg = doctor.Jmbg, IdPatientCard = patientCard.Id, IdRoom = room.Id, DateAndTime = DateTime.Now.Date.AddDays(13).AddHours(7), IsSurveyCompleted = false, ExaminationStatus = ExaminationStatus.CREATED }); context.Add(new Examination { Type = TypeOfExamination.GENERAL, DoctorJmbg = doctor1.Jmbg, IdPatientCard = patientCard.Id, IdRoom = room.Id, DateAndTime = DateTime.Now.Date.AddDays(-2).AddHours(10), IsSurveyCompleted = false, ExaminationStatus = ExaminationStatus.CANCELED }); context.SaveChanges(); }
private void SeedDoctors(MyDbContext context) { context.Add(new Doctor() { Jmbg = "1234567891234", Name = "Mira", Surname = "Mirić", DateOfBirth = new DateTime(1950, 11, 27), Phone = "021457852", Email = "*****@*****.**", HomeAddress = "Maršala Tita 102", Username = "******", DateOfEmployment = new DateTime(2018, 05, 06), CityZipCode = 1, Gender = GenderType.F, NumberOfLicence = "11111111", Password = "******", DoctorsOfficeId = 9 }); context.Add(new Doctor() { Jmbg = "8520147896320", Name = "Dara", Surname = "Darić", DateOfBirth = new DateTime(1950, 11, 27), Phone = "021457852", Email = "*****@*****.**", HomeAddress = "Maršala Tita 102", Username = "******", DateOfEmployment = new DateTime(2010, 11, 15), CityZipCode = 1, Gender = GenderType.F, NumberOfLicence = "22222222", Password = "******", DoctorsOfficeId = 12 }); context.Add(new Doctor() { Jmbg = "0110983520145", Name = "Miloš", Surname = "Milošević", DateOfBirth = new DateTime(1983, 01, 10), Phone = "021852145", Email = "*****@*****.**", HomeAddress = "Balzakova 18", Username = "******", DateOfEmployment = new DateTime(2019, 04, 30), CityZipCode = 2, Gender = GenderType.M, NumberOfLicence = "11111111", Password = "******", DoctorsOfficeId = 20 }); context.Add(new Doctor() { Jmbg = "0323970501235", Name = "Žika", Surname = "Žikić", DateOfBirth = new DateTime(1970, 03, 23), Phone = "021752032", Email = "*****@*****.**", HomeAddress = "Narodnog Fronta 7", Username = "******", DateOfEmployment = new DateTime(2008, 10, 01), CityZipCode = 2, Gender = GenderType.M, NumberOfLicence = "11111111", Password = "******", DoctorsOfficeId = 25 }); context.Add(new Doctor() { Jmbg = "0606988520123", Name = "Marija", Surname = "Marić", DateOfBirth = new DateTime(1988, 06, 06), Phone = "021954201", Email = "*****@*****.**", HomeAddress = "Narodnog Fronta 45", Username = "******", DateOfEmployment = new DateTime(2020, 02, 05), CityZipCode = 1, Gender = GenderType.F, NumberOfLicence = "11111111", Password = "******", DoctorsOfficeId = 49 }); context.Add(new Doctor() { Jmbg = "2007975521021", Name = "Sara", Surname = "Sarić", DateOfBirth = new DateTime(1975, 07, 20), Phone = "021954201", Email = "*****@*****.**", HomeAddress = "Futoška 5", Username = "******", DateOfEmployment = new DateTime(2018, 05, 11), CityZipCode = 2, Gender = GenderType.F, NumberOfLicence = "11111111", Password = "******", DoctorsOfficeId = 51 }); context.SaveChanges(); context.Add(new DoctorSpecialty() { DoctorJmbg = "8520147896320", SpecialtyId = 1 }); context.Add(new DoctorSpecialty() { DoctorJmbg = "0110983520145", SpecialtyId = 1 }); context.Add(new DoctorSpecialty() { DoctorJmbg = "1234567891234", SpecialtyId = 2 }); context.Add(new DoctorSpecialty() { DoctorJmbg = "0323970501235", SpecialtyId = 2 }); context.Add(new DoctorSpecialty() { DoctorJmbg = "0606988520123", SpecialtyId = 3 }); context.Add(new DoctorSpecialty() { DoctorJmbg = "2007975521021", SpecialtyId = 4 }); context.SaveChanges(); }