public async Task <Patient> Save(Patient newPatient) { _dbContext.Patients.Add(newPatient); await _dbContext.SaveChangesAsync(); Log.Information("Patient Created {@newPatient}", newPatient); return(newPatient); }
public async Task DeleteLocationAsync(Location location) { Location location1 = await _coronaContext.Location .FirstOrDefaultAsync(l => l.StartDate == location.StartDate && l.EndDate == location.EndDate && l.Adress == location.Adress && l.City == location.City); _coronaContext.Location.Remove(location1); await _coronaContext.SaveChangesAsync(); }