Commit 3160c673 authored by hasan khaddour's avatar hasan khaddour

modify entites

parent f1d6f3f9
...@@ -10,5 +10,9 @@ namespace ApplicationCore.Entities ...@@ -10,5 +10,9 @@ namespace ApplicationCore.Entities
{ {
public String Name { get; set; } public String Name { get; set; }
public ICollection<Medicine> Medicines { get; set; } public ICollection<Medicine> Medicines { get; set; }
public void AddMedicine(Medicine medicine) {
Medicines.Add(medicine);
}
} }
} }
...@@ -12,5 +12,8 @@ namespace ApplicationCore.Entities ...@@ -12,5 +12,8 @@ namespace ApplicationCore.Entities
public String Description { get; set; } public String Description { get; set; }
public ICollection<Medicine> Medicines { get; set; } public ICollection<Medicine> Medicines { get; set; }
public ICollection<MedicineIngredient> MedicineIngredients { get; set; } public ICollection<MedicineIngredient> MedicineIngredients { get; set; }
} }
} }
...@@ -20,6 +20,16 @@ namespace ApplicationCore.Entities ...@@ -20,6 +20,16 @@ namespace ApplicationCore.Entities
public ICollection<Patient> Patients { get; set; } public ICollection<Patient> Patients { get; set; }
public ICollection<PatientMedicine> PatientMedicines { get; set; } public ICollection<PatientMedicine> PatientMedicines { get; set; }
public void AddIngredient(Ingredient ingredient , int ratio ) {
MedicineIngredients.Add(
new MedicineIngredient
{
Ingredient = ingredient,
Ratio = ratio,
Medicine = this
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment