public void AddAntenna(Antenna antenna) { using (DataClassesDataContext dbconnection = new DataClassesDataContext()) { dbconnection.Antenna.InsertOnSubmit(antenna); try { dbconnection.SubmitChanges(System.Data.Linq.ConflictMode.FailOnFirstConflict); } catch (SqlException ex) { throw ex; } } }
public void UpdateAntenna(Antenna antenna) { using (DataClassesDataContext dbconnection = new DataClassesDataContext()) { var querry = from ante in dbconnection.Antenna where ante.Name == antenna.Name select ante; if (querry.Count() > 0) { dbconnection.Antenna.DeleteOnSubmit(querry.First()); dbconnection.Antenna.InsertOnSubmit(antenna); try { dbconnection.SubmitChanges(System.Data.Linq.ConflictMode.FailOnFirstConflict); } catch (SqlException ex) { throw ex; } } } }
private void detach_Antenna(Antenna entity) { this.SendPropertyChanging(); entity.WaveForm = null; }
private void attach_Antenna(Antenna entity) { this.SendPropertyChanging(); entity.WaveForm = this; }
partial void DeleteAntenna(Antenna instance);
partial void UpdateAntenna(Antenna instance);
partial void InsertAntenna(Antenna instance);