public void UpdateLocation( Location location ) { _context.Entry( location ).State = EntityState.Modified; _context.SaveChanges(); }
public int AddLocation( Location location ) { _context.Locations.Add( location ); _context.SaveChanges(); return location.Id; }