public void Seed() { if (_context.Pacient.Any() || _context.Disease.Any()) { return; } else { Pacient initial = new Pacient(1, "Paulo"); Disease second = new Disease(1, "preguiƧa", DateTime.Now); _context.Disease.AddRange(second); _context.Pacient.AddRange(initial); _context.SaveChanges(); } }
public void Insert(Pacient pacient) { _context.Pacient.Add(pacient); _context.SaveChanges(); }
public void Insert(Disease disease) { _context.Disease.Add(disease); _context.SaveChanges(); }