фикшу баги
This commit is contained in:
parent
ea42dc9fc4
commit
f6c25cf968
@ -80,8 +80,11 @@ namespace VetClinicDataBaseImplement.Models
|
||||
if (medicineAnimals != null && medicineAnimals.Count > 0)
|
||||
{
|
||||
context.MedicineAnimals.RemoveRange(medicineAnimals.Where(rec
|
||||
=> !model.MedicineAnimals.ContainsKey(rec.MedicineId)));
|
||||
|
||||
=> !model.MedicineAnimals.ContainsKey(rec.AnimalId)));
|
||||
foreach (var animal in medicineAnimals)
|
||||
{
|
||||
model.MedicineAnimals.Remove(animal.AnimalId);
|
||||
}
|
||||
context.SaveChanges();
|
||||
}
|
||||
var medicine = context.Medicines.First(x => x.Id == Id);
|
||||
|
Loading…
Reference in New Issue
Block a user