partial void DeletePlayerInjuryHistory(PlayerInjuryHistory instance);
partial void UpdatePlayerInjuryHistory(PlayerInjuryHistory instance);
partial void InsertPlayerInjuryHistory(PlayerInjuryHistory instance);
private void detach_PlayerInjuryHistories(PlayerInjuryHistory entity) { this.SendPropertyChanging(); entity.Players = null; }
private void attach_PlayerInjuryHistories(PlayerInjuryHistory entity) { this.SendPropertyChanging(); entity.InjuryStatus = this; }
private static PlayerInjuryHistory InsertPlayerInjuryHistory(NPGGFFLDataContext context, int playerId, int injuryStatusId, string description, DateTime reportDtm) { var pihExists = context.PlayerInjuryHistories.Where(pih => pih.PlayerId == playerId && pih.ReportDtm == reportDtm && pih.InjuryStatusId == injuryStatusId).FirstOrDefault(); if (pihExists == null) { PlayerInjuryHistory pih = new PlayerInjuryHistory { PlayerId = playerId, InjuryStatusId = injuryStatusId, Description = description, ReportDtm = reportDtm }; context.PlayerInjuryHistories.InsertOnSubmit(pih); context.SubmitChanges(); return context.PlayerInjuryHistories.Where(pih2 => pih2.PlayerId == playerId && pih2.ReportDtm == reportDtm && pih2.InjuryStatusId == injuryStatusId).First(); } else { return pihExists; } }