private void SeedPharmacyNotification(PharmacyDbContext context) { context.Add(new PharmacyNotification { Content = "Lexapro on sale! Get 15% off!", Approved = true, PharmacyId = "Jankovic" }); context.Add(new PharmacyNotification { Content = "Aspirin on sale! Get 11% off!", Approved = true, PharmacyId = "Liman" }); context.SaveChanges(); }
private void SeedUrgentMedicationProcurement(PharmacyDbContext context) { context.Add(new UrgentMedicationProcurement { MedicationName = "Brufen", MedicationDosage = "600mg", MedicationQuantity = 5 }); context.SaveChanges(); }
public void SeedAllEntities(PharmacyDbContext context) { SeedPharmacies(context); SeedPharmacyNotification(context); // TODO(Jovan): Remove once MedbayTech.Medication is fully finished /*SeedMedicationCategory(context); * SeedMedicationIngredient(context); * SeedMedication(context); * SeedMedicationUsage(context);*/ SeedUrgentMedicationProcurement(context); }
private void SeedPharmacies(PharmacyDbContext context) { context.Add(new Pharmacy { Id = "Jankovic", APIKey = "ID1APIKEYAAAA", APIEndpoint = "jankovic.rs", Email = "*****@*****.**", RecieveNotificationFrom = true }); context.Add(new Pharmacy { Id = "Liman", APIKey = "ID2APIKEYAAAA", APIEndpoint = "liman.li", Email = "*****@*****.**", RecieveNotificationFrom = true }); context.Add(new Pharmacy { Id = "SchnabelRemote", APIKey = "ID3APIKEYAAAA", APIEndpoint = "http://schnabel.herokuapp.com/pswapi/drugs/name/", Email = "*****@*****.**", RecieveNotificationFrom = true }); context.Add(new Pharmacy { Id = "SchnabellLocal", APIKey = "ID4APIKEYAAAA", APIEndpoint = "localhost:6565", Email = "*****@*****.**", RecieveNotificationFrom = true }); context.SaveChanges(); }
public bool IsAlreadyFull(PharmacyDbContext context) => context.Pharmacies.Count() > 0;