public Discipline AddDiscipline(string name, int sportId, int scaleId, string description) { try { var d = new Discipline(); d.Description = description; d.Name = name; d.ScaleId = scaleId; d.SportId = sportId; db.Discipline.InsertOnSubmit(d); db.SubmitChanges(); return d; } catch (Exception e) { return null; } }
partial void DeleteDiscipline(Discipline instance);
partial void UpdateDiscipline(Discipline instance);
partial void InsertDiscipline(Discipline instance);
private void detach_Discipline(Discipline entity) { this.SendPropertyChanging(); entity.Sports = null; }
private void attach_Discipline(Discipline entity) { this.SendPropertyChanging(); entity.Sports = this; }